diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-12-01 14:28:06 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-12-01 14:28:06 +0000 |
commit | d34d8813c5fa9b8031432c45c008b3a7a0d97441 (patch) | |
tree | 55c9c7d433f909d1af59bc9e1671cee07a80c7c3 /usr.sbin/bgpd/control.c | |
parent | d2eb742e2cf480aa441fc39d7cec70b5c3e71ca6 (diff) |
Use an artificial address family id in struct bgpd_addr and almost everywhere
else. Adds conversion functions to map AFI/SAFI and the Unix AF_ values
from and into AID used in bgpd. This is needed to support things like MPLS
VPN and other upcomming changes that need to play a lot with AFI/SAFI pairs.
Mostly mechanical change, henning@ has no particular issues with this.
Must go in so that I can continue working.
Diffstat (limited to 'usr.sbin/bgpd/control.c')
-rw-r--r-- | usr.sbin/bgpd/control.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index ef1378f7788..84d29d95765 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.63 2009/11/02 20:38:15 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.64 2009/12/01 14:28:05 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -371,7 +371,7 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) neighbor->descr[PEER_DESCR_LEN - 1] = 0; ribreq->peerid = 0; p = NULL; - if (neighbor->addr.af) { + if (neighbor->addr.aid) { p = getpeerbyaddr(&neighbor->addr); if (p == NULL) { control_result(c, @@ -398,8 +398,8 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) break; } if ((imsg.hdr.type == IMSG_CTL_SHOW_RIB_PREFIX) - && (ribreq->prefix.af != AF_INET) - && (ribreq->prefix.af != AF_INET6)) { + && (ribreq->prefix.aid != AID_INET) + && (ribreq->prefix.aid != AID_INET6)) { /* malformed request, must specify af */ control_result(c, CTL_RES_PARSE_ERROR); break; |