selinux: Fix packet forwarding checks on postrouting
The IPSKB_FORWARDED and IP6SKB_FORWARDED flags are used only in the multicast forwarding case to indicate that a packet looped back after forward. So these flags are not a good indicator for packet forwarding. A better indicator is the incoming interface. If we have no socket context, but an incoming interface and we see the packet in the ip postroute hook, the packet is going to be forwarded. With this patch we use the incoming interface as an indicator on packet forwarding. Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com> Acked-by: NPaul Moore <paul.moore@hp.com> Signed-off-by: NEric Paris <eparis@redhat.com>
Showing
想要评论请 注册 或 登录