• Doug Ledford's avatar
    IPoIB: Fix ipoib_hard_header() return value · 83bdd3b9
    Doug Ledford authored
    If you have a patched up dhcp server (and dhclient), they will use
    AF_PACKET/SOCK_DGRAM pair to send dhcp packets over IPoIB.
    
    However, when testing an upstream kernel, this has been broken for a
    very long time (I tested 2.6.34, 2.6.38, 3.0, 3.1, 3.8, HEAD).
    
    It turns out that the hard_header routine in ipoib is not following
    the API and is returning 0 even when it pushed data onto the skb.
    This then causes af_packet.c to overwrite the header just pushed with
    data from user space.
    
    Fixing this gets DHCP working on IPoIB.
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
    83bdd3b9
ipoib_main.c 43.8 KB