diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2007-07-19 11:58:59 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2007-07-19 11:58:59 +0000 |
commit | b5ed954f0faf008c86fd042e1cb34ea76fdbf500 (patch) | |
tree | 2ebf2f681e87e4bd2b8c3cae68fbd4bd6d22581a /net/openbgpd/files/patch-bgpd_carp.c | |
parent | - Update to 3.70 (diff) |
- Update net/openbgpd to 4.0.
- Add some information about the configuration file and its permissions.
Notes
Notes:
svn path=/head/; revision=195889
Diffstat (limited to 'net/openbgpd/files/patch-bgpd_carp.c')
-rw-r--r-- | net/openbgpd/files/patch-bgpd_carp.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/net/openbgpd/files/patch-bgpd_carp.c b/net/openbgpd/files/patch-bgpd_carp.c new file mode 100644 index 000000000000..eb6c4e3b10cb --- /dev/null +++ b/net/openbgpd/files/patch-bgpd_carp.c @@ -0,0 +1,65 @@ +--- bgpd/carp.c 19 Jun 2006 12:06:24 -0000 1.3 ++++ bgpd/carp.c 8 Feb 2007 10:31:16 -0000 +@@ -102,28 +102,7 @@ carp_demote_shutdown(void) + int + carp_demote_get(char *group) + { +- int s; +- struct ifgroupreq ifgr; +- +- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { +- log_warn("carp_demote_get: socket"); +- return (-1); +- } +- +- bzero(&ifgr, sizeof(ifgr)); +- strlcpy(ifgr.ifgr_name, group, sizeof(ifgr.ifgr_name)); +- +- if (ioctl(s, SIOCGIFGATTR, (caddr_t)&ifgr) == -1) { +- if (errno == ENOENT) +- log_warnx("group \"%s\" does not exist", group); +- else +- log_warn("carp_demote_get: ioctl"); +- close(s); +- return (-1); +- } +- +- close(s); +- return ((int)ifgr.ifgr_attrib.ifg_carp_demoted); ++ return (-1); + } + + int +@@ -156,26 +135,5 @@ carp_demote_set(char *group, int demote) + int + carp_demote_ioctl(char *group, int demote) + { +- int s, res; +- struct ifgroupreq ifgr; +- +- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { +- log_warn("carp_demote_get: socket"); +- return (-1); +- } +- +- bzero(&ifgr, sizeof(ifgr)); +- strlcpy(ifgr.ifgr_name, group, sizeof(ifgr.ifgr_name)); +- ifgr.ifgr_attrib.ifg_carp_demoted = demote; +- +- if ((res = ioctl(s, SIOCSIFGATTR, (caddr_t)&ifgr)) == -1) +- log_warn("unable to %s the demote state " +- "of group '%s'", (demote > 0) ? "increment" : "decrement", +- group); +- else +- log_info("%s the demote state of group '%s'", +- (demote > 0) ? "incremented" : "decremented", group); +- +- close (s); +- return (res); ++ return (-1); + } +Index: kroute.c +=================================================================== +RCS file: /cvs/src/usr.sbin/bgpd/kroute.c,v +retrieving revision 1.147 +diff -u -p -r1.147 kroute.c |