summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c
index 83ca442be04..1922f058312 100644
--- a/usr.sbin/bgpd/util.c
+++ b/usr.sbin/bgpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.72 2022/11/07 11:33:24 mbuhl Exp $ */
+/* $OpenBSD: util.c,v 1.73 2022/11/09 14:23:53 claudio Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -131,7 +131,9 @@ log_rd(uint64_t rd)
snprintf(buf, sizeof(buf), "rd %s:%hu", inet_ntoa(addr), u16);
break;
default:
- return ("rd ?");
+ snprintf(buf, sizeof(buf), "rd #%016llx",
+ (unsigned long long)rd);
+ break;
}
return (buf);
}
@@ -596,6 +598,7 @@ nlri_get_vpn4(u_char *p, uint16_t len, struct bgpd_addr *prefix,
return (-1);
if (withdraw) {
/* on withdraw ignore the labelstack all together */
+ p += 3;
plen += 3;
pfxlen -= 3 * 8;
break;
@@ -659,6 +662,7 @@ nlri_get_vpn6(u_char *p, uint16_t len, struct bgpd_addr *prefix,
return (-1);
if (withdraw) {
/* on withdraw ignore the labelstack all together */
+ p += 3;
plen += 3;
pfxlen -= 3 * 8;
break;