summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-11 23:51:08 -0700
committerAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-11 23:51:08 -0700
commit14d2bbaa3f4aa53152472694c29f336808e47313 (patch)
treee39bdddef4ea53207dd8fb61e1fd6b54d8c7721d /zebra/rt_netlink.c
parent51d4ef832c1e58150325630e25c442866e5a6cf5 (diff)
parente96b312150d8e376c1ef463793d1929eca3618d5 (diff)
downloadquagga-14d2bbaa.tar.bz2
quagga-14d2bbaa.tar.xz
Merge quagga mainline into the google ISIS code.
The steps were: $ git checkout google-is-is $ git merge quagga $ git checkout google-is-is -- isisd # Resolve conflicts in the following: lib/md5.h zebra/rt_netlink.c zebra/zebra_rib.c zebra/zserv.c Note that the content in the isisd directory is left unchanged in the merge. As a result, changes made to isisd as part of the following commits on the quagga mainline are dropped. # 8ced4e82 is the merge base, e96b3121 is the current quagga master $ git log --oneline --reverse 8ced4e82..e96b3121 -- isisd 5574999 isisd: fix crash on "no router isis" (BZ#536) 8998075 isisd: raise hello rate for DIS (BZ#539) 306ca83 isisd: include hash.h, not hash.c b82cdeb delete CVS keywords 2f65867 isisd: indent longopts array b511468 quagga: option "-z" ("--socket <path>") added 05e54ee build: delete .cvsignore files b4e45f6 fix zebra protocol after MP-BGP changes 7fd6cd8 isisd: fix circuit state machine 907fd95 isisd: send proper LSP after DIS election d034aa0 isisd: fix wrong next-hops from SPF c25eaff isisd: unexpected kernel routing table (BZ#544) e6b03b7 isisd: implement MD5 circuit authentication
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 2cde50a1..73097bf6 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -732,7 +732,7 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (!tb[RTA_MULTIPATH])
rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, src, index,
- table, metric, 0);
+ table, metric, 0, SAFI_UNICAST);
else
{
/* This is a multipath route */
@@ -786,7 +786,7 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (rib->nexthop_num == 0)
XFREE (MTYPE_RIB, rib);
else
- rib_add_ipv4_multipath (&p, rib);
+ rib_add_ipv4_multipath (&p, rib, SAFI_UNICAST);
}
}
#ifdef HAVE_IPV6
@@ -798,7 +798,7 @@ netlink_routing_table (struct sockaddr_nl *snl, struct nlmsghdr *h)
p.prefixlen = rtm->rtm_dst_len;
rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, flags, &p, gate, index, table,
- metric, 0);
+ metric, 0, SAFI_UNICAST);
}
#endif /* HAVE_IPV6 */
@@ -833,6 +833,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
int index;
int table;
int metric;
+
void *dest;
void *gate;
void *src;
@@ -909,7 +910,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (tb[RTA_PREFSRC])
src = RTA_DATA (tb[RTA_PREFSRC]);
- if (tb[RTA_PRIORITY])
+ if (h->nlmsg_type == RTM_NEWROUTE && tb[RTA_PRIORITY])
metric = *(int *) RTA_DATA(tb[RTA_PRIORITY]);
if (rtm->rtm_family == AF_INET)
@@ -933,7 +934,7 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
{
if (!tb[RTA_MULTIPATH])
rib_add_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, src, index, table,
- metric, 0);
+ metric, 0, SAFI_UNICAST);
else
{
/* This is a multipath route */
@@ -987,11 +988,11 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
if (rib->nexthop_num == 0)
XFREE (MTYPE_RIB, rib);
else
- rib_add_ipv4_multipath (&p, rib);
+ rib_add_ipv4_multipath (&p, rib, SAFI_UNICAST);
}
}
else
- rib_delete_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table);
+ rib_delete_ipv4 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, SAFI_UNICAST);
}
#ifdef HAVE_IPV6
@@ -1017,9 +1018,9 @@ netlink_route_change (struct sockaddr_nl *snl, struct nlmsghdr *h)
}
if (h->nlmsg_type == RTM_NEWROUTE)
- rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, 0, 0);
+ rib_add_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, metric, 0, SAFI_UNICAST);
else
- rib_delete_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table);
+ rib_delete_ipv6 (ZEBRA_ROUTE_KERNEL, 0, &p, gate, index, table, SAFI_UNICAST);
}
#endif /* HAVE_IPV6 */
@@ -1953,11 +1954,7 @@ extern struct thread_master *master;
static int
kernel_read (struct thread *thread)
{
- int ret;
- int sock;
-
- sock = THREAD_FD (thread);
- ret = netlink_parse_info (netlink_information_fetch, &netlink);
+ netlink_parse_info (netlink_information_fetch, &netlink);
thread_add_read (zebrad.master, kernel_read, NULL, netlink.sock);
return 0;