diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2013-03-22 08:24:37 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-24 17:16:30 -0400 |
commit | be991971d53e0f5b6d13e3940192054216590072 (patch) | |
tree | 8d8b92e82104a51d0954a4f062d758efed6ee2a4 /include | |
parent | 63998ac24f8370caf99e433483532bab8368eb7e (diff) | |
download | op-kernel-dev-be991971d53e0f5b6d13e3940192054216590072.zip op-kernel-dev-be991971d53e0f5b6d13e3940192054216590072.tar.gz |
inet: generalize ipv4-only RFC3168 5.3 ecn fragmentation handling for future use by ipv6
This patch just moves some code arround to make the ip4_frag_ecn_table
and IPFRAG_ECN_* constants accessible from the other reassembly engines. I
also renamed ip4_frag_ecn_table to ip_frag_ecn_table.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jesper Dangaard Brouer <jbrouer@redhat.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_frag.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 0a1dcc2..64b4e7d 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -153,4 +153,16 @@ static inline void inet_frag_lru_add(struct netns_frags *nf, list_add_tail(&q->lru_list, &nf->lru_list); spin_unlock(&nf->lru_lock); } + +/* RFC 3168 support : + * We want to check ECN values of all fragments, do detect invalid combinations. + * In ipq->ecn, we store the OR value of each ip4_frag_ecn() fragment value. + */ +#define IPFRAG_ECN_NOT_ECT 0x01 /* one frag had ECN_NOT_ECT */ +#define IPFRAG_ECN_ECT_1 0x02 /* one frag had ECN_ECT_1 */ +#define IPFRAG_ECN_ECT_0 0x04 /* one frag had ECN_ECT_0 */ +#define IPFRAG_ECN_CE 0x08 /* one frag had ECN_CE */ + +extern const u8 ip_frag_ecn_table[16]; + #endif |