? obj
Index: Makefile
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile	17 Jun 2006 14:06:09 -0000	1.25
+++ Makefile	8 Feb 2007 10:31:16 -0000
@@ -5,7 +5,7 @@
 PROG=	bgpd
 SRCS=	bgpd.c buffer.c session.c log.c parse.y config.c imsg.c \
 	rde.c rde_rib.c rde_decide.c rde_prefix.c mrt.c kroute.c \
-	control.c pfkey.c rde_update.c rde_attr.c printconf.c \
+	control.c pfkey_compat.c rde_update.c rde_attr.c printconf.c \
 	rde_filter.c pftable.c name2id.c util.c carp.c
 CFLAGS+= -Wall -I${.CURDIR}
 CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
Index: bgpd.h
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/bgpd.h,v
retrieving revision 1.208
diff -u -p -r1.208 bgpd.h
--- bgpd.h	27 Aug 2006 16:11:04 -0000	1.208
+++ bgpd.h	8 Feb 2007 10:31:16 -0000
@@ -30,6 +30,9 @@
 #include <poll.h>
 #include <stdarg.h>
 
+#define __dead __dead2
+#define RTA_LABEL 0
+
 #define	BGP_VERSION			4
 #define	BGP_PORT			179
 #define	CONFFILE			"/etc/bgpd.conf"
@@ -467,12 +470,12 @@ struct ctl_neighbor {
 
 struct kroute_label {
 	struct kroute	kr;
-	char		label[RTLABEL_LEN];
+	char		label[PFTABLE_LEN];
 };
 
 struct kroute6_label {
 	struct kroute6	kr;
-	char		label[RTLABEL_LEN];
+	char		label[PFTABLE_LEN];
 };
 
 #define	F_RIB_ELIGIBLE	0x01
@@ -644,7 +647,7 @@ struct filter_set {
 		struct bgpd_addr	nexthop;
 		struct filter_community	community;
 		char			pftable[PFTABLE_LEN];
-		char			rtlabel[RTLABEL_LEN];
+		char			rtlabel[PFTABLE_LEN];
 	} action;
 	enum action_types		type;
 };
Index: carp.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/carp.c,v
retrieving revision 1.3
diff -u -p -r1.3 carp.c
--- carp.c	19 Jun 2006 12:06:24 -0000	1.3
+++ 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
--- kroute.c	3 Aug 2006 22:40:25 -0000	1.147
+++ kroute.c	8 Feb 2007 10:31:16 -0000
@@ -1732,7 +1732,9 @@ send_rtmsg(int fd, int action, struct kr
 		struct sockaddr_in	prefix;
 		struct sockaddr_in	nexthop;
 		struct sockaddr_in	mask;
+#if 0
 		struct sockaddr_rtlabel	label;
+#endif
 	} r;
 
 	if (kr_state.fib_sync == 0)
@@ -1765,9 +1767,11 @@ send_rtmsg(int fd, int action, struct kr
 	r.mask.sin_family = AF_INET;
 	r.mask.sin_addr.s_addr = htonl(prefixlen2mask(kroute->prefixlen));
 
+#if 0
 	r.label.sr_len = sizeof(r.label);
 	strlcpy(r.label.sr_label, rtlabel_id2name(kroute->labelid),
 	    sizeof(r.label.sr_label));
+#endif
 
 retry:
 	if (write(fd, &r, sizeof(r)) == -1) {
@@ -1808,7 +1812,9 @@ send_rt6msg(int fd, int action, struct k
 		struct sockaddr_in6	prefix;
 		struct sockaddr_in6	nexthop;
 		struct sockaddr_in6	mask;
+#if 0
 		struct sockaddr_rtlabel	label;
+#endif
 	} r;
 
 	if (kr_state.fib_sync == 0)
@@ -1841,9 +1847,11 @@ send_rt6msg(int fd, int action, struct k
 	memcpy(&r.mask.sin6_addr, prefixlen2mask6(kroute->prefixlen),
 	    sizeof(struct in6_addr));
 
+#if 0
 	r.label.sr_len = sizeof(r.label);
 	strlcpy(r.label.sr_label, rtlabel_id2name(kroute->labelid),
 	    sizeof(r.label.sr_label));
+#endif
 
 retry:
 	if (write(fd, &r, sizeof(r)) == -1) {
Index: pfkey_compat.c
===================================================================
RCS file: pfkey_compat.c
diff -N pfkey_compat.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ pfkey_compat.c	8 Feb 2007 10:31:16 -0000
@@ -0,0 +1,27 @@
+#include "bgpd.h"
+#include "session.h"
+
+int
+pfkey_establish(struct peer *p)
+{
+	if (p->conf.auth.method)
+		return (-1);
+	return (0);
+}
+
+int
+pfkey_remove(struct peer *p)
+{
+        if (p->conf.auth.method)
+                return (-1);
+        return (0);
+}
+
+int
+pfkey_init(struct bgpd_sysdep *sysdep)
+{
+	log_warnx("no kernel support for PF_KEY");
+	sysdep->no_pfkey = 1;
+	return (0);
+}
+
