Revision e7c243c925f6d9dcb898504ff24d6650b5cbb3b1 authored by Evgeniy Polyakov on 25 August 2007, 06:36:29 UTC, committed by David S. Miller on 27 August 2007, 01:35:47 UTC
I tried to preserve bridging code as it was before, but logic is quite strange - I think we should free skb on error, since it is already unshared and thus will just leak. Herbert Xu states: > + if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) > + goto out; If this happens it'll be a double-free on skb since we'll return NF_DROP which makes the caller free it too. We could return NF_STOLEN to prevent that but I'm not sure whether that's correct netfilter semantics. Patrick, could you please make a call on this? Patrick McHardy states: NF_STOLEN should work fine here. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7c8347a
if_fc.h
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* Global definitions for Fibre Channel.
*
* Version: @(#)if_fc.h 0.0 11/20/98
*
* Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* Donald Becker, <becker@super.org>
* Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
* Vineet Abraham, <vma@iol.unh.edu>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _LINUX_IF_FC_H
#define _LINUX_IF_FC_H
#define FC_ALEN 6 /* Octets in one ethernet addr */
#define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc))
#define FC_ID_LEN 3 /* Octets in a Fibre Channel Address */
/* LLC and SNAP constants */
#define EXTENDED_SAP 0xAA
#define UI_CMD 0x03
/* This is NOT the Fibre Channel frame header. The FC frame header is
* constructed in the driver as the Tachyon needs certain fields in
* certains positions. So, it can't be generalized here.*/
struct fch_hdr {
__u8 daddr[FC_ALEN]; /* destination address */
__u8 saddr[FC_ALEN]; /* source address */
};
/* This is a Fibre Channel LLC structure */
struct fcllc {
__u8 dsap; /* destination SAP */
__u8 ssap; /* source SAP */
__u8 llc; /* LLC control field */
__u8 protid[3]; /* protocol id */
__be16 ethertype; /* ether type field */
};
#endif /* _LINUX_IF_FC_H */
Computing file changes ...