1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

rtsold: make it work on if_vlan interfaces

Reviewed by:	kp
Obtained from:	pfsense
MFC after:	1 week
This commit is contained in:
Luiz Otavio O Souza 2021-08-19 11:48:04 +02:00 committed by Kristof Provost
parent a54abe119e
commit 1a4d7030bb

View File

@ -262,6 +262,7 @@ lladdropt_length(struct sockaddr_dl *sdl)
{
switch (sdl->sdl_type) {
case IFT_ETHER:
case IFT_L2VLAN:
return (ROUNDUP8(ETHER_ADDR_LEN + 2));
default:
return (0);
@ -277,6 +278,7 @@ lladdropt_fill(struct sockaddr_dl *sdl, struct nd_opt_hdr *ndopt)
switch (sdl->sdl_type) {
case IFT_ETHER:
case IFT_L2VLAN:
ndopt->nd_opt_len = (ROUNDUP8(ETHER_ADDR_LEN + 2)) >> 3;
addr = (char *)(ndopt + 1);
memcpy(addr, LLADDR(sdl), ETHER_ADDR_LEN);