pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

new patch: pass IFP interface index if known (normal case) to make interface specific routes work such as in



Module Name:	pkgsrc-wip
Committed By:	Frank Kardel <kardel%netbsd.org@localhost>
Pushed By:	kardel
Date:		Mon Oct 26 13:57:43 2020 +0100
Changeset:	63a4ed93d50f4ddca7d3932b8ff099452b76252f

Modified Files:
	frr/distinfo
Added Files:
	frr/patches/patch-zebra_kernel__socket.c

Log Message:
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

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=63a4ed93d50f4ddca7d3932b8ff099452b76252f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 frr/distinfo                             |  1 +
 frr/patches/patch-zebra_kernel__socket.c | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diffs:
diff --git a/frr/distinfo b/frr/distinfo
index becf772178..a233774cbb 100644
--- a/frr/distinfo
+++ b/frr/distinfo
@@ -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
diff --git a/frr/patches/patch-zebra_kernel__socket.c b/frr/patches/patch-zebra_kernel__socket.c
new file mode 100644
index 0000000000..702fe31245
--- /dev/null
+++ b/frr/patches/patch-zebra_kernel__socket.c
@@ -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;
+ 


Home | Main Index | Thread Index | Old Index