Apply by doing: cd /usr/src patch -p0 < 001_bgpd.patch Rebuild and install the bgp daemon: cd usr.sbin/bgpd make obj make depend make make install Index: usr.sbin/bgpd/session.c =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/session.c,v retrieving revision 1.310 retrieving revision 1.310.2.1 diff -u -r1.310 -r1.310.2.1 --- usr.sbin/bgpd/session.c 27 Jun 2010 19:53:34 -0000 1.310 +++ usr.sbin/bgpd/session.c 15 Nov 2010 14:15:47 -0000 1.310.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.310 2010/06/27 19:53:34 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.310.2.1 2010/11/15 14:15:47 stephan Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -247,7 +247,7 @@ peer_cnt = 0; ctl_cnt = 0; - if ((conf = malloc(sizeof(struct bgpd_config))) == NULL) + if ((conf = calloc(1, sizeof(struct bgpd_config))) == NULL) fatal(NULL); if ((conf->listen_addrs = calloc(1, sizeof(struct listen_addrs))) == NULL) Index: usr.sbin/bgpd/rde.c =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v retrieving revision 1.297 retrieving revision 1.297.2.1 diff -u -r1.297 -r1.297.2.1 --- usr.sbin/bgpd/rde.c 14 Jul 2010 09:00:08 -0000 1.297 +++ usr.sbin/bgpd/rde.c 15 Nov 2010 14:15:47 -0000 1.297.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.297 2010/07/14 09:00:08 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.297.2.1 2010/11/15 14:15:47 stephan Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -227,7 +227,7 @@ if (rdomains_l == NULL) fatal(NULL); SIMPLEQ_INIT(rdomains_l); - if ((conf = malloc(sizeof(struct bgpd_config))) == NULL) + if ((conf = calloc(1, sizeof(struct bgpd_config))) == NULL) fatal(NULL); log_info("route decision engine ready");