summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d/lsupdate.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-10-10 14:09:26 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-10-10 14:09:26 +0000
commit34c540de32da6090afdcdd6fee481f9a2df345fd (patch)
treecd80eb9d2e40cb44f8f68b64fe72f80016049023 /usr.sbin/ospf6d/lsupdate.c
parent00614674fd7c30c31cd6d99eee5ef9d519d5da32 (diff)
send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope if necessary. While there switch to sendto() we don't need any of the sendmsg() features here. OK norby@
Diffstat (limited to 'usr.sbin/ospf6d/lsupdate.c')
-rw-r--r--usr.sbin/ospf6d/lsupdate.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/ospf6d/lsupdate.c b/usr.sbin/ospf6d/lsupdate.c
index 9dcca18409a..a0bf916e74c 100644
--- a/usr.sbin/ospf6d/lsupdate.c
+++ b/usr.sbin/ospf6d/lsupdate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsupdate.c,v 1.1 2007/10/08 10:44:50 norby Exp $ */
+/* $OpenBSD: lsupdate.c,v 1.2 2007/10/10 14:09:25 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -200,7 +200,6 @@ int
send_ls_update(struct buf *buf, struct iface *iface, struct in6_addr addr,
u_int32_t nlsa)
{
- struct sockaddr_in6 dst;
int ret;
nlsa = htonl(nlsa);
@@ -210,12 +209,7 @@ send_ls_update(struct buf *buf, struct iface *iface, struct in6_addr addr,
if (upd_ospf_hdr(buf, iface))
goto fail;
- /* set destination */
- dst.sin6_family = AF_INET6;
- dst.sin6_len = sizeof(struct sockaddr_in6);
- dst.sin6_addr = addr;
-
- ret = send_packet(iface, buf->buf, buf->wpos, &dst);
+ ret = send_packet(iface, buf->buf, buf->wpos, &addr);
buf_free(buf);
return (ret);