summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/pfkey.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-03-31 10:25:36 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-03-31 10:25:36 +0000
commitb1b86ff21f87d93765f57f3538d4b30fc64c2595 (patch)
treec671a4b3eb30f73d5dfcde06e6617ab43ee4b350 /usr.sbin/bgpd/pfkey.c
parent6e036df6f1c2eb85424316eaae4772f502918cad (diff)
allow empty (wildcard) sockaddr for src or dst
Diffstat (limited to 'usr.sbin/bgpd/pfkey.c')
-rw-r--r--usr.sbin/bgpd/pfkey.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/pfkey.c b/usr.sbin/bgpd/pfkey.c
index c158c5e0007..0240f8a8ee3 100644
--- a/usr.sbin/bgpd/pfkey.c
+++ b/usr.sbin/bgpd/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.14 2004/03/15 16:00:59 henning Exp $ */
+/* $OpenBSD: pfkey.c,v 1.15 2004/03/31 10:25:35 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -75,6 +75,9 @@ pfkey_send(int sd, uint8_t mtype, struct bgpd_addr *src,
ssrc.ss_len = sizeof(struct sockaddr_in6);
ssrc.ss_family = AF_INET6;
break;
+ case 0:
+ ssrc.ss_len = sizeof(struct sockaddr);
+ break;
default:
return (-1);
/* not reached */
@@ -93,6 +96,9 @@ pfkey_send(int sd, uint8_t mtype, struct bgpd_addr *src,
sdst.ss_len = sizeof(struct sockaddr_in6);
sdst.ss_family = AF_INET6;
break;
+ case 0:
+ sdst.ss_len = sizeof(struct sockaddr);
+ break;
default:
return (-1);
/* not reached */