[systemd-commits] src/libsystemd-network

Michal Sekletar msekleta at kemper.freedesktop.org
Wed Jun 18 09:20:57 PDT 2014


 src/libsystemd-network/dhcp-network.c |    1 -
 1 file changed, 1 deletion(-)

New commits:
commit 03966da2ca04ca96dd0a1852d7fa423aaf18eba6
Author: Michal Sekletar <msekleta at redhat.com>
Date:   Wed Jun 18 18:14:51 2014 +0200

    dhcp-network: remove TODO
    
    There is no need to explicitly check version of L3 protocol in the
    ethernet header because we bind socket with .sll_protocol set to
    ETH_P_IP, thus we only receive IPv4 packets on the socket.

diff --git a/src/libsystemd-network/dhcp-network.c b/src/libsystemd-network/dhcp-network.c
index 266bf13..d7ba0ef 100644
--- a/src/libsystemd-network/dhcp-network.c
+++ b/src/libsystemd-network/dhcp-network.c
@@ -38,7 +38,6 @@ int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link,
             BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0),                                 /* A <- packet length */
             BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(DHCPPacket), 1, 0),         /* packet >= DHCPPacket ? */
             BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */
-            /* TODO: match ip.version */
             BPF_STMT(BPF_LD + BPF_B + BPF_ABS, offsetof(DHCPPacket, ip.protocol)), /* A <- IP protocol */
             BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 1, 0),                /* IP protocol == UDP ? */
             BPF_STMT(BPF_RET + BPF_K, 0),                                          /* ignore */



More information about the systemd-commits mailing list