Исправление работы на свежих ядрах

Send your patches here
Post Reply
stasn77
Posts: 8
Joined: 02 Mar 2016, 15:21

Исправление работы на свежих ядрах

Post by stasn77 »

В свежих версиях ядер (последние longterm и 4.20+) accel перестал работать корректно.
Причина - https://git.kernel.org/pub/scm/linux/ke ... b2d31015c5 и еще пару патчей.
В результате он не может отсылать нормально как минимум ARP ответы и возможно PPPoE.

У себя решил так:

Code: Select all

--- a/accel-pppd/ctrl/ipoe/arp.c.orig
+++ b/accel-pppd/ctrl/ipoe/arp.c
@@ -59,6 +59,7 @@
        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);
@@ -136,6 +137,7 @@
        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);
--- a/accel-pppd/ctrl/pppoe/pppoe.c.orig
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -748,6 +748,7 @@
                .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);
Attachments
sll_halen.patch.gz
(373 Bytes) Downloaded 258 times
Dmitry
Администратор
Posts: 954
Joined: 09 Oct 2014, 10:06

Re: Исправление работы на свежих ядрах

Post by Dmitry »

commit 1f835bb6bb54cf186e549d58318090b988b6b93a
спасибо
Post Reply