Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.218.2.4 retrieving revision 1.250.6.2 diff -u -p -r1.218.2.4 -r1.250.6.2 --- src/sys/netinet/ip_input.c 2007/09/03 14:42:58 1.218.2.4 +++ src/sys/netinet/ip_input.c 2007/07/19 20:48:56 1.250.6.2 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.218.2.4 2007/09/03 14:42:58 yamt Exp $ */ +/* $NetBSD: ip_input.c,v 1.250.6.2 2007/07/19 20:48:56 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.218.2.4 2007/09/03 14:42:58 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.250.6.2 2007/07/19 20:48:56 dyoung Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -2079,12 +2079,13 @@ ip_savecontrol(struct inpcb *inp, struct if (inp->inp_flags & INP_RECVIF) { struct sockaddr_dl sdl; - sockaddr_dl_init(&sdl, sizeof(sdl), - (m->m_pkthdr.rcvif != NULL) - ? m->m_pkthdr.rcvif->if_index - : 0, - 0, NULL, 0, NULL, 0); - *mp = sbcreatecontrol(&sdl, sdl.sdl_len, IP_RECVIF, IPPROTO_IP); + sdl.sdl_len = offsetof(struct sockaddr_dl, sdl_data[0]); + sdl.sdl_family = AF_LINK; + sdl.sdl_index = m->m_pkthdr.rcvif ? + m->m_pkthdr.rcvif->if_index : 0; + sdl.sdl_nlen = sdl.sdl_alen = sdl.sdl_slen = 0; + *mp = sbcreatecontrol((void *) &sdl, sdl.sdl_len, + IP_RECVIF, IPPROTO_IP); if (*mp) mp = &(*mp)->m_next; }