• Adam Wujek's avatar
    userspace/tools/radiusvlan: fix receiving frames from other interfaces · 6ffe5a28
    Adam Wujek authored
    Before the fix in some rare cases, radiusvlan could report a receive
    of frames from another interface. This could lead to a wrong
    authentication of a device connected to a port.
    
    The problem is caused by a behaviour that if a socket is created it
    listens on all interfaces until the bind function is called. It might
    happen that later calls of recvfrom function will handle frames
    received from other interfaces. To prevent that, radiusvlan flushes
    all frames received before socket is bound to an interface.
    The lost of frames is meaningless since all frames that radiusvlan
    listens for are sent periodically.
    Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
    6ffe5a28
radiusvlan.c 22.4 KB