1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

- bzero sockaddr_dl

- use constant instead of number

Suggested by:	ru
This commit is contained in:
Gleb Smirnoff 2005-02-12 19:19:29 +00:00
parent 82ec256c67
commit ba20540e3d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141755

View File

@ -516,12 +516,10 @@ ng_ether_rcvmsg(node_p node, item_p item, hook_p lasthook)
error = EINVAL;
break;
}
bzero(&sa_dl, sizeof(struct sockaddr_dl));
sa_dl.sdl_len = sizeof(struct sockaddr_dl);
sa_dl.sdl_family = AF_LINK;
sa_dl.sdl_index = 0;
sa_dl.sdl_nlen = 0;
sa_dl.sdl_alen = 6;
sa_dl.sdl_slen = 0;
sa_dl.sdl_alen = ETHER_ADDR_LEN;
bcopy((void *)msg->data, LLADDR(&sa_dl),
ETHER_ADDR_LEN);
error = if_addmulti(priv->ifp,
@ -536,12 +534,10 @@ ng_ether_rcvmsg(node_p node, item_p item, hook_p lasthook)
error = EINVAL;
break;
}
bzero(&sa_dl, sizeof(struct sockaddr_dl));
sa_dl.sdl_len = sizeof(struct sockaddr_dl);
sa_dl.sdl_family = AF_LINK;
sa_dl.sdl_index = 0;
sa_dl.sdl_nlen = 0;
sa_dl.sdl_alen = 6;
sa_dl.sdl_slen = 0;
sa_dl.sdl_alen = ETHER_ADDR_LEN;
bcopy((void *)msg->data, LLADDR(&sa_dl),
ETHER_ADDR_LEN);
error = if_delmulti(priv->ifp,