diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-02-23 11:21:42 -0500 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-02-23 11:23:29 -0500 |
| commit | 6b1ebf3c3c8270fa8cf8a59b3204652add55e383 (patch) | |
| tree | 7c44131002fd3e1e0e6a2c4379230693a37b74cd /zebra/kernel_socket.c | |
| parent | 2580e72f8d62d9094ddea2af72de222edcac4ccc (diff) | |
| parent | fb444efb6853da1baa0abbfbc4932657518fe6c3 (diff) | |
Merge branch 'master' into stylechecker
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 89c933f90f..4d888d8069 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -40,6 +40,7 @@ #include "privs.h" #include "vrf.h" +#include "zebra/rt.h" #include "zebra/interface.h" #include "zebra/zserv.h" #include "zebra/debug.h" @@ -906,6 +907,8 @@ void rtm_read(struct rt_msghdr *rtm) SET_FLAG(zebra_flags, ZEBRA_FLAG_STATIC); memset(&nh, 0, sizeof(nh)); + + nh.vrf_id = VRF_DEFAULT; /* This is a reject or blackhole route */ if (flags & RTF_REJECT) { nh.type = NEXTHOP_TYPE_BLACKHOLE; @@ -1039,7 +1042,7 @@ void rtm_read(struct rt_msghdr *rtm) if (rtm->rtm_type == RTM_CHANGE) rib_delete(AFI_IP, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - NULL, 0, 0, true); + NULL, 0, 0, true, NULL); if (!nh.type) { nh.type = NEXTHOP_TYPE_IPV4; @@ -1050,11 +1053,11 @@ void rtm_read(struct rt_msghdr *rtm) || rtm->rtm_type == RTM_CHANGE) rib_add(AFI_IP, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - &nh, 0, 0, 0, 0); + &nh, 0, 0, 0, 0, 0); else rib_delete(AFI_IP, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - &nh, 0, 0, true); + &nh, 0, 0, true, NULL); } if (dest.sa.sa_family == AF_INET6) { /* One day we might have a debug section here like one in the @@ -1085,7 +1088,7 @@ void rtm_read(struct rt_msghdr *rtm) if (rtm->rtm_type == RTM_CHANGE) rib_delete(AFI_IP6, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - NULL, 0, 0, true); + NULL, 0, 0, true, NULL); if (!nh.type) { nh.type = ifindex ? NEXTHOP_TYPE_IPV6_IFINDEX @@ -1098,11 +1101,11 @@ void rtm_read(struct rt_msghdr *rtm) || rtm->rtm_type == RTM_CHANGE) rib_add(AFI_IP6, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - &nh, 0, 0, 0, 0); + &nh, 0, 0, 0, 0, 0); else rib_delete(AFI_IP6, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - &nh, 0, 0, true); + &nh, 0, 0, true, NULL); } } @@ -1194,7 +1197,7 @@ int rtm_write(int message, union sockunion *dest, union sockunion *mask, msg.rtm.rtm_flags |= RTF_MPLS; if (mpls->smpls.smpls_label - != htonl(MPLS_IMP_NULL_LABEL << MPLS_LABEL_OFFSET)) + != htonl(MPLS_LABEL_IMPLICIT_NULL << MPLS_LABEL_OFFSET)) msg.rtm.rtm_mpls = MPLS_OP_PUSH; } #endif |
