2004-10-22 Paul Jakma <paul@dishone.st>

* ospfd/ospf_packet.c: setsockopt_pktinfo -> setsockopt_ifindex
	* zebra/irdp_main.c: ditto
This commit is contained in:
paul 2004-10-22 17:00:38 +00:00
parent 4927cf0bf0
commit 06f953f7ab
4 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,7 @@
function.
* ospf_packet.c: (ospf_read) manually look up ifindex
if system could not have returned one, eg openbsd.
Change setsockopt_pktinfo to setsockopt_ifindex.
2004-10-19 Andrew J. Schorr <aschorr@telemetry-investments.com>

View File

@ -2303,6 +2303,9 @@ ospf_read (struct thread *thread)
if (ibuf == NULL)
return -1;
iph = (struct ip *) STREAM_DATA (ibuf);
sockopt_iphdrincl_swab_systoh (iph);
/* openbsd lacks IP_RECVIF */
#if !(defined(IP_PKTINFO) || defined(IP_RECVIF))
if (ifp == NULL)
@ -2314,9 +2317,6 @@ ospf_read (struct thread *thread)
stream_free (ibuf);
return 0;
}
iph = (struct ip *) STREAM_DATA (ibuf);
sockopt_iphdrincl_swab_systoh (iph);
/* prepare for next packet. */
ospf->t_read = thread_add_read (master, ospf_read, ospf, ospf->fd);

View File

@ -1,3 +1,7 @@
2004-10-22 Paul Jakma <paul@dishone.st>
* irdp_main.c: change setsockopt_pktinfo to setsockopt_ifindex
2004-10-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
* rt_netlink.c: (netlink_interface_addr) For PtP interfaces, ignore

View File

@ -125,7 +125,7 @@ irdp_sock_init (void)
return ret;
};
ret = setsockopt_pktinfo (AF_INET, irdp_sock, 1);
ret = setsockopt_ifindex (AF_INET, irdp_sock, 1);
if (ret < 0) {
zlog_warn ("IRDP: can't do irdp sockopt %s", strerror(errno));
return ret;