new patch:
pass IFP interface index if known (normal case) to make interface specific routes work such as in ipv6 route ::/0 <ipv6 address> carp0 100 ivv6 route ::/0 <other ipv6 address> 200
This commit is contained in:
parent
3c722b48a6
commit
63a4ed93d5
|
@ -7,3 +7,4 @@ Size (frr-7.4.tar.gz) = 6074854 bytes
|
|||
SHA1 (patch-lib_zlog.c) = 206b6c48129d8122bf23d245f3d86284e5057fee
|
||||
SHA1 (patch-pkgsrc_zebra.sh.in) = d458e74a1f3319f6e075d3d3a81414bc7d7022f2
|
||||
SHA1 (patch-zebra_ioctl.c) = 99b7606564f4dc620df997889156b5c09f7fb396
|
||||
SHA1 (patch-zebra_kernel__socket.c) = 9bf24d86923715e3e15cad073df1210bc0608e89
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
$NetBSD$
|
||||
|
||||
Pass IFP interface index if known (normal case) to make
|
||||
interface specific routes work such as in
|
||||
|
||||
ipv6 route ::/0 <ipv6 address> carp0 100
|
||||
ivv6 route ::/0 <other ipv6 address> 200
|
||||
|
||||
--- zebra/kernel_socket.c.orig 2020-06-30 11:08:57.000000000 +0000
|
||||
+++ zebra/kernel_socket.c
|
||||
@@ -1277,6 +1277,19 @@ int rtm_write(int message, union sockuni
|
||||
#ifdef __OpenBSD__
|
||||
SOCKADDRSET(mpls, RTA_SRC);
|
||||
#endif
|
||||
+#ifdef __NetBSD__
|
||||
+ if (index > 0) {
|
||||
+ struct sockaddr_dl sdl;
|
||||
+
|
||||
+ memset(&sdl, 0, sizeof(sdl));
|
||||
+ sdl.sdl_len = sizeof(sdl);
|
||||
+ sdl.sdl_family = AF_LINK;
|
||||
+ sdl.sdl_index = index;
|
||||
+
|
||||
+ msg.rtm.rtm_addrs |= RTA_IFP;
|
||||
+ SOCKADDRSET(&sdl, RTA_IFP);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
msg.rtm.rtm_msglen = pnt - (caddr_t)&msg;
|
||||
|
Loading…
Reference in New Issue