ipv4 ipsec
Subsystems (2)
Hi,
Im not sure this is the correct list for ipsec issues, but shouldn't the size check at the bottom of net/ipv4/esp4.c be the other way around (2.6.11)?
static int __init esp4_init(void)
{
struct xfrm_decap_state decap;
if (sizeof(struct esp_decap_data) <
sizeof(decap.decap_data)) {
extern void decap_data_too_small(void);
decap_data_too_small();
}decap.decap_data should hold an opaque type for the implementation specific decap state, so I guess it should be the bigger of the two.
Best regards
Signature · 14 lines
Programmer
Edgar E Iglesias <[email protected]> 46.46.272.1946
% diff -bu /usr/src/linux-2.6.11-gentoo-r8/net/ipv4/esp4.c esp4.c
--- /usr/src/linux-2.6.11-gentoo-r8/net/ipv4/esp4.c 2005-05-11 10:05:03.000000000 +0200
+++ esp4.c 2005-06-01 00:38:55.000000000 +0200
@@ -480,7 +480,7 @@
{
struct xfrm_decap_state decap;
- if (sizeof(struct esp_decap_data) <
+ if (sizeof(struct esp_decap_data) >
sizeof(decap.decap_data)) {
extern void decap_data_too_small(void);David S. Miller
maintainerFrom: Edgar E Iglesias <[email protected]>
Date: Wed, 1 Jun 2005 00:47:17 +0200
Quoted 3 lines
Im not sure this is the correct list for ipsec issues, but shouldn't the size check at the bottom of
net/ipv4/esp4.cbe the other way around (2.6.11)?
You are right, good catch. Luckily the size of esp_decap_data is exactly 20 bytes, so the incorrect test happens to be harmless.
esp4.c 2005-06-01 00:38:55.000000000 +0200
Quoted 2 lines
esp4.c 2005-06-01 00:38:55.000000000 +0200 renamed from usr/src/linux-2.6.11-gentoo-r8/net/ipv4/esp4.c 2005-05-11 10:05:03.000000000 +0200 +0
-0
Please porperly -p1 root your patch so I can apply it, and also please provide a "Signed-off-by: " line for yourself as well.
It may seem pointless for a one-line patch, but I want to get you and others into the habit of submitting patches properly in the future.
Quoted 9 lines · David S. Miller
From: Edgar E Iglesias <[email protected]>
Date: Wed, 1 Jun 2005 00:47:17 +0200Quoted 3 lines
Im not sure this is the correct list for ipsec issues, but shouldn't the size check at the bottom of
net/ipv4/esp4.cbe the other way around (2.6.11)?You are right, good catch. Luckily the size of
esp_decap_datais exactly 20 bytes, so the incorrect test happens to be harmless.
mostly harmless..
But for gcc ports that create packed structs per default, it is 19 bytes.
Quoted 10 lines
esp4.c 2005-06-01 00:38:55.000000000 +0200
Quoted 3 lines
esp4.c 2005-06-01 00:38:55.000000000 +0200 renamed from usr/src/linux-2.6.11-gentoo-r8/net/ipv4/esp4.c 2005-05-11 10:05:03.000000000 +0200 +0
-0Please porperly -p1 root your patch so I can apply it, and also please provide a "Signed-off-by: " line for yourself as well.
It may seem pointless for a one-line patch, but I want to get you and others into the habit of submitting patches properly in the future.
oh sorry, I hope I get it right this time :)
Best regards
Signature · 17 lines
Programmer
Edgar E Iglesias <[email protected]> 46.46.272.1946
Signed-off-by: Edgar E Iglesias <[email protected]>
---------
% diff -Naur linux-2.6.11-gentoo-r6/net/ipv4/esp4.c linux-2.6.11-gentoo-r9/net/ipv4/esp4.c
--- linux-2.6.11-gentoo-r6/net/ipv4/esp4.c 2005-04-14 21:39:32.000000000 +0200
+++ linux-2.6.11-gentoo-r9/net/ipv4/esp4.c 2005-06-01 00:38:55.000000000 +0200
@@ -480,7 +480,7 @@
{
struct xfrm_decap_state decap;
- if (sizeof(struct esp_decap_data) <
+ if (sizeof(struct esp_decap_data) >
sizeof(decap.decap_data)) {
extern void decap_data_too_small(void);David S. Miller
maintainerFrom: Edgar E Iglesias <[email protected]>
Date: Wed, 1 Jun 2005 01:23:40 +0200
Quoted 1 line
oh sorry, I hope I get it right this time :)
Your email client has mangled the tab characters into spaces in the patch, so the patch still will not apply correctly.
Please fix this.
Quoted 9 lines · David S. Miller
From: Edgar E Iglesias <[email protected]>
Date: Wed, 1 Jun 2005 01:23:40 +0200Quoted 1 line
oh sorry, I hope I get it right this time :)
Your email client has mangled the tab characters into spaces in the patch, so the patch still will not apply correctly.
Please fix this.
One more try.. sorry
Best regards
Signature · 17 lines
Programmer
Edgar E Iglesias <[email protected]> 46.46.272.1946
Signed-off-by: Edgar E Iglesias <[email protected]>
-----
--- linux-2.6.11-gentoo-r6/net/ipv4/esp4.c 2005-04-14 21:39:32.000000000 +0200
+++ linux-2.6.11-gentoo-r9/net/ipv4/esp4.c 2005-06-01 00:38:55.000000000 +0200
@@ -480,7 +480,7 @@
{
struct xfrm_decap_state decap;
- if (sizeof(struct esp_decap_data) <
+ if (sizeof(struct esp_decap_data) >
sizeof(decap.decap_data)) {
extern void decap_data_too_small(void);David S. Miller
maintainerFrom: Edgar E Iglesias <[email protected]>
Date: Wed, 1 Jun 2005 02:02:59 +0200
net/ipv4/esp4.c
Quoted 2 lines
net/ipv4/esp4.c +0
-0
Patch applied, thank you.