Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-12-18 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Sun, 18 Dec 2005 15:27:01 +0100), Patrick McHardy [EMAIL PROTECTED] says: YOSHIFUJI Hideaki wrote: In article [EMAIL PROTECTED] (at Tue, 22 Nov 2005 02:14:26 +0100), Patrick McHardy [EMAIL PROTECTED] says: The easiest way would be to store nhoff

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-12-18 Thread YOSHIFUJI Hideaki / 吉藤英明
In article [EMAIL PROTECTED] (at Sun, 18 Dec 2005 23:59:35 +0100), Patrick McHardy [EMAIL PROTECTED] says: YOSHIFUJI Hideaki wrote: : BTW, we're now using full of skb-cb (and we are even exceeding it w/ mobile-ipv6 extensions)... Not in mainline so far, so maybe we can fit your

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-12-04 Thread Herbert Xu
On Sun, Dec 04, 2005 at 11:06:02PM +0100, Patrick McHardy wrote: I'm worried about this bit. This looks like it'll go back to the top of the IP stack with the existing call chain. So could grow as the number of transforms increase. Its not so bad. It adds ip_xfrm_transport_hook and

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-12-04 Thread Patrick McHardy
Herbert Xu wrote: On Sun, Dec 04, 2005 at 11:06:02PM +0100, Patrick McHardy wrote: If there is a DNAT in the way, this will jump to the very start of the stack. So if we have a hostile IPsec peer, and the DNAT rules are such that this can occur, then we could be in trouble (especially because

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-30 Thread Herbert Xu
On Sun, Nov 20, 2005 at 04:31:36PM +, Patrick McHardy wrote: @@ -145,7 +149,17 @@ int xfrm4_rcv_encap(struct sk_buff *skb, netif_rx(skb); return 0; } else { +#ifdef CONFIG_NETFILTER + __skb_push(skb, skb-data - skb-nh.raw); +

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-23 Thread YOSHIFUJI Hideaki / 吉藤英明
Hello. In article [EMAIL PROTECTED] (at Tue, 22 Nov 2005 02:14:26 +0100), Patrick McHardy [EMAIL PROTECTED] says: The easiest way would be to store nhoff somewhere in the skb and use it to continue at the next header. But I still hope there is a way without keeping data in the skb. We've

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Kazunori Miyazawa
Hello Patrick, I have a comment about the patch on the IPv6 input process. The kernel applied your patch will always call ip6_rcv_finish when enabling netfilter and receiving a esp packet so that it will always look up the routing table and parse extention headers twice a packet. It will probably

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread YOSHIFUJI Hideaki / 吉藤英明
Hello. In article [EMAIL PROTECTED] (at Mon, 21 Nov 2005 17:31:41 +0900), Kazunori Miyazawa [EMAIL PROTECTED] says: Your ip_xfrm_transport_hook is a good idea, I think. We could call ip6_rcv_finish if the netfilter changed the addresses or otherwise we can continue the loop to avoid the

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Yasuyuki KOZAKAI
Hi, From: Patrick McHardy [EMAIL PROTECTED] Date: Mon, 21 Nov 2005 07:52:36 +0100 I don't see why it is confusing. Plain text packets are visible before encapsulation (and they have to be because we don't necessarily know if packets will be encapsulated at the time the hooks are called in

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Patrick McHardy
Kazunori Miyazawa wrote: Hello Patrick, I have a comment about the patch on the IPv6 input process. The kernel applied your patch will always call ip6_rcv_finish when enabling netfilter and receiving a esp packet so that it will always look up the routing table and parse extention headers

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Patrick McHardy
Yasuyuki KOZAKAI wrote: I don't see why it is confusing. Plain text packets are visible before encapsulation (and they have to be because we don't necessarily know if packets will be encapsulated at the time the hooks are called in case the policy lookup after NAT returns a policy), plain text

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Patrick McHardy
David S. Miller wrote: I've read over Patrick's two most recent postings of these patches and I think they are generally sane and I cannot find any holes in them. Herbert brought up the legitimate concern about defragmentation, but I think that's a detail and does not take away from the

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Kazunori Miyazawa
Patrick McHardy wrote: Kazunori Miyazawa wrote: Hello Patrick, I have a comment about the patch on the IPv6 input process. The kernel applied your patch will always call ip6_rcv_finish when enabling netfilter and receiving a esp packet so that it will always look up the routing table and parse

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-21 Thread Patrick McHardy
Kazunori Miyazawa wrote: Patrick McHardy wrote: The problem is that netfilter hooks take ownership of the skb, so the caller can't touch it afterwards. It would be possible, but it would become very ugly. Can I assume that you would also be satisfied if the double-parsing of extension headers

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-20 Thread Yasuyuki KOZAKAI
Hi, Patrick, From: Patrick McHardy [EMAIL PROTECTED] Date: Sun, 20 Nov 2005 17:31:36 +0100 [IPV4/6]: Netfilter IPsec input hooks When the innermost transform uses transport mode the decapsulated packet is not visible to netfilter. Pass the packet through the PRE_ROUTING and LOCAL_IN hooks

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-20 Thread Patrick McHardy
Yasuyuki KOZAKAI wrote: At first, now I could agree to use same name for hooks before/after xfrm processing, if it's important to keep compatibility than to avoid difficulty to use. Even now I think it's confusing to pass packets before/after xfrm to same hook, and believe it's ideal to use

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-20 Thread David S. Miller
From: Patrick McHardy [EMAIL PROTECTED] Date: Mon, 21 Nov 2005 07:52:36 +0100 I don't see why it is confusing. Plain text packets are visible before encapsulation (and they have to be because we don't necessarily know if packets will be encapsulated at the time the hooks are called in case

Re: [PATCH 06/13]: [IPV4/6]: Netfilter IPsec input hooks

2005-11-20 Thread Herbert Xu
David S. Miller [EMAIL PROTECTED] wrote: I've read over Patrick's two most recent postings of these patches and I think they are generally sane and I cannot find any holes in them. Herbert brought up the legitimate concern about defragmentation, but I think that's a detail and does not take