summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/ospfe.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-11-17 08:55:32 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-11-17 08:55:32 +0000
commitaa748b97fe57f4635f47ab0336b87da3cb55858c (patch)
tree743416ed5e159cd87cda9bea1f0e9405f2a2f539 /usr.sbin/ospfd/ospfe.c
parent78604d2745675cfadeb29e2681177ec9ec7a86b5 (diff)
Support for multiple networks on one interface. Until now only the main
address of a interface could be used. Now it is possible to specify a interface more than once if multiple networks are configured. An alternative network can be specified via e.g. interface em0:10.0.5.1. The old interface syntax without the IP still works and uses the main/first configured IP address. ospfd now needs to include the IP header on outgoing messages as it is not possible to specifiy the source address in sendto(2). Additionally all multicast joins and leaves have to be tracked. OK norby@
Diffstat (limited to 'usr.sbin/ospfd/ospfe.c')
-rw-r--r--usr.sbin/ospfd/ospfe.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c
index 59833170181..471ccf60870 100644
--- a/usr.sbin/ospfd/ospfe.c
+++ b/usr.sbin/ospfd/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.48 2006/09/27 14:37:38 claudio Exp $ */
+/* $OpenBSD: ospfe.c,v 1.49 2006/11/17 08:55:31 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -97,15 +97,10 @@ ospfe(struct ospfd_conf *xconf, int pipe_parent2ospfe[2], int pipe_ospfe2rde[2],
fatal("error creating raw socket");
/* set some defaults */
- if (if_set_mcast_ttl(xconf->ospf_socket,
- IP_DEFAULT_MULTICAST_TTL) == -1)
- fatal("if_set_mcast_ttl");
-
if (if_set_mcast_loop(xconf->ospf_socket) == -1)
fatal("if_set_mcast_loop");
-
- if (if_set_tos(xconf->ospf_socket, IPTOS_PREC_INTERNETCONTROL) == -1)
- fatal("if_set_tos");
+ if (if_set_ip_hdrincl(xconf->ospf_socket) == -1)
+ fatal("if_set_ip_hdrincl");
if (if_set_recvif(xconf->ospf_socket, 1) == -1)
fatal("if_set_recvif");
if_set_recvbuf(xconf->ospf_socket);