summaryrefslogtreecommitdiff
path: root/ripngd/ripngd.c
diff options
context:
space:
mode:
authorAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-09 00:25:15 -0700
committerAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-09 00:25:15 -0700
commit3cf6c2b4e43f44a977d218c96c26250654ae333e (patch)
treee017cde2015fbf3ef6c250327428d7c6152aa8f7 /ripngd/ripngd.c
parent01d7ff0a2166a422c56bd26f04fc22832a9e690b (diff)
parente96b312150d8e376c1ef463793d1929eca3618d5 (diff)
Merge branch 'quagga' into google-bgp-multipath
Conflicts: bgpd/bgp_route.c
Diffstat (limited to 'ripngd/ripngd.c')
-rw-r--r--ripngd/ripngd.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 6e32d83c..8e97c2f8 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -117,6 +117,11 @@ ripng_make_socket (void)
ret = setsockopt_ipv6_pktinfo (sock, 1);
if (ret < 0)
return ret;
+#ifdef IPTOS_PREC_INTERNETCONTROL
+ ret = setsockopt_ipv6_tclass (sock, IPTOS_PREC_INTERNETCONTROL);
+ if (ret < 0)
+ return ret;
+#endif
ret = setsockopt_ipv6_multicast_hops (sock, 255);
if (ret < 0)
return ret;
@@ -2480,28 +2485,10 @@ DEFUN (ripng_timers,
unsigned long update;
unsigned long timeout;
unsigned long garbage;
- char *endptr = NULL;
- update = strtoul (argv[0], &endptr, 10);
- if (update == ULONG_MAX || *endptr != '\0')
- {
- vty_out (vty, "update timer value error%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- timeout = strtoul (argv[1], &endptr, 10);
- if (timeout == ULONG_MAX || *endptr != '\0')
- {
- vty_out (vty, "timeout timer value error%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
-
- garbage = strtoul (argv[2], &endptr, 10);
- if (garbage == ULONG_MAX || *endptr != '\0')
- {
- vty_out (vty, "garbage timer value error%s", VTY_NEWLINE);
- return CMD_WARNING;
- }
+ VTY_GET_INTEGER_RANGE("update timer", update, argv[0], 0, 65535);
+ VTY_GET_INTEGER_RANGE("timeout timer", timeout, argv[1], 0, 65535);
+ VTY_GET_INTEGER_RANGE("garbage timer", garbage, argv[2], 0, 65535);
/* Set each timer value. */
ripng->update_time = update;