Skip to content

Commit

Permalink
initialize ssl_halen = ETH_ALEN in sockaddr_ll structures
Browse files Browse the repository at this point in the history
  • Loading branch information
xebd committed Mar 8, 2019
1 parent 965380a commit 1f835bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions accel-pppd/ctrl/ipoe/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ static void arp_ctx_read(struct _arphdr *ah)
memset(&dst, 0, sizeof(dst));
dst.sll_family = AF_PACKET;
dst.sll_ifindex = ipoe->ifindex;
dst.sll_halen = ETH_ALEN;
dst.sll_protocol = htons(ETH_P_ARP);

ah2.ar_hrd = htons(ARPHRD_ETHER);
Expand Down Expand Up @@ -136,6 +137,7 @@ void arp_send(int ifindex, struct _arphdr *arph, int broadcast)
memset(&dst, 0, sizeof(dst));
dst.sll_family = AF_PACKET;
dst.sll_ifindex = ifindex;
dst.sll_halen = ETH_ALEN;
dst.sll_protocol = htons(ETH_P_ARP);
if (broadcast)
memcpy(dst.sll_addr, bc_addr, ETH_ALEN);
Expand Down
1 change: 1 addition & 0 deletions accel-pppd/ctrl/pppoe/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ static void pppoe_send(struct pppoe_serv_t *serv, const uint8_t *pack)
.sll_family = AF_PACKET,
.sll_protocol = htons(ETH_P_PPP_DISC),
.sll_ifindex = serv->ifindex,
.sll_halen = ETH_ALEN,
};

struct pppoe_hdr *hdr = (struct pppoe_hdr *)(pack + ETH_HLEN);
Expand Down

0 comments on commit 1f835bb

Please sign in to comment.