• E
    netfilter: ipv6: Don't preserve original oif for loopback address · b2011cc8
    Eli Cooper 提交于
    nline inclusion
    from mainline-5.0
    commit 15df03c661cb
    category: bugfix
    bugzilla: 9388
    CVE: NA
    
    -------------------------------------------------
    
    Commit 508b09046c0f ("netfilter: ipv6: Preserve link scope traffic
    original oif") made ip6_route_me_harder() keep the original oif for
    link-local and multicast packets. However, it also affected packets
    for the loopback address because it used rt6_need_strict().
    
    REDIRECT rules in the OUTPUT chain rewrite the destination to loopback
    address; thus its oif should not be preserved. This commit fixes the bug
    that redirected local packets are being dropped. Actually the packet was
    not exactly dropped; Instead it was sent out to the original oif rather
    than lo. When a packet with daddr ::1 is sent to the router, it is
    effectively dropped.
    
    Fixes: 508b09046c0f ("netfilter: ipv6: Preserve link scope traffic original oif")
    Signed-off-by: NEli Cooper <elicooper@gmx.com>
    Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: NZhiqiang Liu <liuzhiqiang26@huawei.com>
    Reviewed-by: NMao Wenan <maowenan@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    b2011cc8
netfilter.c 3.3 KB