Bug 15683 - XFRM IS NOT UPDATING ETH TYPE FIELD FOR INNER PACKET ON ETH
Summary: XFRM IS NOT UPDATING ETH TYPE FIELD FOR INNER PACKET ON ETH
Status: RESOLVED OBSOLETE
Alias: None
Product: Networking
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Arnaldo Carvalho de Melo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-02 18:17 UTC by Panisset
Modified: 2012-07-09 08:17 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.28-2
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Panisset 2010-04-02 18:17:06 UTC
Before doing this change wireshark was showing the inner packet as
"malformed" as it uses the ethernet's type field to classify the L3
packets as IPv6, IPv4 and so on.
The problem is when the inner packet is reinserted into Linux stack
and the ethernet header keeps holding on its type field a value for
the protocol of outer packet.

Below my correction on file net/xfrm/xfrm_input.c, function xfrm_prepare_input:

...

skb->protocol = inner_mode->afinfo->eth_proto; // existing code
eth_hdr(skb)->h_proto = skb->protocol; // my change, adding this line

...

Regards,
Eduardo Panisset.
Comment 1 Andrew Morton 2010-04-05 19:54:43 UTC
(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Fri, 2 Apr 2010 18:17:07 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=15683
> 
>            Summary: XFRM IS NOT UPDATING ETH TYPE FIELD FOR INNER PACKET
>                     ON ETH
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 2.6.28-2
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: acme@ghostprotocols.net
>         ReportedBy: eduardo.panisset@gmail.com
>         Regression: No
> 
> 
> Before doing this change wireshark was showing the inner packet as
> "malformed" as it uses the ethernet's type field to classify the L3
> packets as IPv6, IPv4 and so on.
> The problem is when the inner packet is reinserted into Linux stack
> and the ethernet header keeps holding on its type field a value for
> the protocol of outer packet.
> 
> Below my correction on file net/xfrm/xfrm_input.c, function
> xfrm_prepare_input:
> 
> ...
> 
> skb->protocol = inner_mode->afinfo->eth_proto; // existing code
> eth_hdr(skb)->h_proto = skb->protocol; // my change, adding this line
> 
> ...
>
Comment 2 Andrew Morton 2010-04-05 19:56:24 UTC
(resend - I forgot to cc Eduardo)

(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Fri, 2 Apr 2010 18:17:07 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=15683
> 
>            Summary: XFRM IS NOT UPDATING ETH TYPE FIELD FOR INNER PACKET
>                     ON ETH
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 2.6.28-2
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>         AssignedTo: acme@ghostprotocols.net
>         ReportedBy: eduardo.panisset@gmail.com
>         Regression: No
> 
> 
> Before doing this change wireshark was showing the inner packet as
> "malformed" as it uses the ethernet's type field to classify the L3
> packets as IPv6, IPv4 and so on.
> The problem is when the inner packet is reinserted into Linux stack
> and the ethernet header keeps holding on its type field a value for
> the protocol of outer packet.
> 
> Below my correction on file net/xfrm/xfrm_input.c, function
> xfrm_prepare_input:
> 
> ...
> 
> skb->protocol = inner_mode->afinfo->eth_proto; // existing code
> eth_hdr(skb)->h_proto = skb->protocol; // my change, adding this line
> 
> ...
>

Note You need to log in before you can comment on or make changes to this bug.