• Tom Parkin's avatar
    udp: add encap_destroy callback · 44046a59
    Tom Parkin authored
    Users of udp encapsulation currently have an encap_rcv callback which they can
    use to hook into the udp receive path.
    In situations where a encapsulation user allocates resources associated with a
    udp encap socket, it may be convenient to be able to also hook the proto
    .destroy operation.  For example, if an encap user holds a reference to the
    udp socket, the destroy hook might be used to relinquish this reference.
    This patch adds a socket destroy hook into udp, which is set and enabled
    in the same way as the existing encap_rcv hook.
    Signed-off-by: default avatarTom Parkin <tparkin@katalix.com>
    Signed-off-by: default avatarJames Chapman <jchapman@katalix.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
udp.c 36.9 KB