]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
arp-util: drop redundant line
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Nov 2021 01:33:57 +0000 (10:33 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 9 Nov 2021 08:32:09 +0000 (09:32 +0100)
The client's IP address is already loaded to X.
(The comment of the dropped line is wrong, X instead of A.)

src/libsystemd-network/arp-util.c

index 7ef96a6ab8c8a0daec8e2186605877b20aae2557..99a5f69b7029740dac94bbde43274823454fb8a1 100644 (file)
@@ -48,7 +48,6 @@ int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *
                 BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_spa)),       /* A <- SPA */
                 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 0, 1),                                  /* A == X ? */
                 BPF_STMT(BPF_RET + BPF_K, UINT32_MAX),                                         /* accept */
-                BPF_STMT(BPF_LDX + BPF_IMM, htobe32(a->s_addr)),                               /* A <- clients IP */
                 BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_tpa)),       /* A <- TPA */
                 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_X, 0, 0, 1),                                  /* A == 0 ? */
                 BPF_STMT(BPF_RET + BPF_K, UINT32_MAX),                                         /* accept */