|
@@ -62,7 +62,7 @@ EXPORT_SYMBOL_GPL(gre_del_protocol);
|
|
|
|
|
|
/* Fills in tpi and returns header length to be pulled. */
|
|
/* Fills in tpi and returns header length to be pulled. */
|
|
int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
|
|
int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
|
|
- bool *csum_err)
|
|
|
|
|
|
+ bool *csum_err, __be16 proto)
|
|
{
|
|
{
|
|
const struct gre_base_hdr *greh;
|
|
const struct gre_base_hdr *greh;
|
|
__be32 *options;
|
|
__be32 *options;
|
|
@@ -109,11 +109,11 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
|
|
tpi->seq = 0;
|
|
tpi->seq = 0;
|
|
}
|
|
}
|
|
/* WCCP version 1 and 2 protocol decoding.
|
|
/* WCCP version 1 and 2 protocol decoding.
|
|
- * - Change protocol to IP
|
|
|
|
|
|
+ * - Change protocol to IPv4/IPv6
|
|
* - When dealing with WCCPv2, Skip extra 4 bytes in GRE header
|
|
* - When dealing with WCCPv2, Skip extra 4 bytes in GRE header
|
|
*/
|
|
*/
|
|
if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) {
|
|
if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) {
|
|
- tpi->proto = htons(ETH_P_IP);
|
|
|
|
|
|
+ tpi->proto = proto;
|
|
if ((*(u8 *)options & 0xF0) != 0x40)
|
|
if ((*(u8 *)options & 0xF0) != 0x40)
|
|
hdr_len += 4;
|
|
hdr_len += 4;
|
|
}
|
|
}
|