summaryrefslogtreecommitdiffstats
path: root/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-06-30 13:57:01 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-06-30 13:57:01 +0300
commitdfe933b7227e91533200981cbc4a2ee51a5f5e51 (patch)
tree4b5a42d3a57e73306a66a06de34b41611a92ec58 /main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch
parentdb7f405e94e690b550f70f4a1c7a8681d167f904 (diff)
downloadaports-dfe933b7227e91533200981cbc4a2ee51a5f5e51.tar.bz2
aports-dfe933b7227e91533200981cbc4a2ee51a5f5e51.tar.xz
main/quagga: cherry-pick bgp fixes from 0.99.23-stable branch
Diffstat (limited to 'main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch')
-rw-r--r--main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch b/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch
new file mode 100644
index 000000000..edbe60e6f
--- /dev/null
+++ b/main/quagga/0005-bgpd-fix-IP-endianness-in-debug-message.patch
@@ -0,0 +1,28 @@
+From bb02b82354a80f74706efc5e4c914b3f89fb033e Mon Sep 17 00:00:00 2001
+From: David Lamparter <equinox@opensourcerouting.org>
+Date: Wed, 4 Jun 2014 01:01:00 +0200
+Subject: [PATCH] bgpd: fix IP endianness in debug message
+
+inet_ntop expects network byte order.
+
+Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
+---
+ bgpd/bgp_attr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
+index a1fd165..f9fde9f 100644
+--- a/bgpd/bgp_attr.c
++++ b/bgpd/bgp_attr.c
+@@ -1110,7 +1110,7 @@ bgp_attr_nexthop (struct bgp_attr_parser_args *args)
+ if (IPV4_NET0 (nexthop_h) || IPV4_NET127 (nexthop_h) || IPV4_CLASS_DE (nexthop_h))
+ {
+ char buf[INET_ADDRSTRLEN];
+- inet_ntop (AF_INET, &nexthop_h, buf, INET_ADDRSTRLEN);
++ inet_ntop (AF_INET, &nexthop_n, buf, INET_ADDRSTRLEN);
+ zlog (peer->log, LOG_ERR, "Martian nexthop %s", buf);
+ return bgp_attr_malformed (args,
+ BGP_NOTIFY_UPDATE_INVAL_NEXT_HOP,
+--
+2.0.1
+