aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-04 16:16:49 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-04 16:16:49 -0500
commit6d04e3b04b6ab569cabeb5ca28ad1be11777e895 (patch)
treeaaee636d71492f36fdef9977488c85a64063f8c4 /net/ipv4
parent42270035c6550101f7dc742a630c2590dd2d3ae0 (diff)
parent5c15bdec5c38f4ccf73ef2585fc80a6164de9554 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [VLAN]: Avoid a 4-order allocation. [HDLC] Fix dev->header_cache_update having a random value. [NetLabel]: Verify sensitivity level has a valid CIPSO mapping [PPPOE]: Key connections properly on local device. [AF_UNIX]: Test against sk_max_ack_backlog properly. [NET]: Fix bugs in "Whether sock accept queue is full" checking
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/cipso_ipv4.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 60aafb4a8a..c976dd7e97 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -732,11 +732,12 @@ static int cipso_v4_map_lvl_hton(const struct cipso_v4_doi *doi_def,
732 *net_lvl = host_lvl; 732 *net_lvl = host_lvl;
733 return 0; 733 return 0;
734 case CIPSO_V4_MAP_STD: 734 case CIPSO_V4_MAP_STD:
735 if (host_lvl < doi_def->map.std->lvl.local_size) { 735 if (host_lvl < doi_def->map.std->lvl.local_size &&
736 doi_def->map.std->lvl.local[host_lvl] < CIPSO_V4_INV_LVL) {
736 *net_lvl = doi_def->map.std->lvl.local[host_lvl]; 737 *net_lvl = doi_def->map.std->lvl.local[host_lvl];
737 return 0; 738 return 0;
738 } 739 }
739 break; 740 return -EPERM;
740 } 741 }
741 742
742 return -EINVAL; 743 return -EINVAL;
@@ -771,7 +772,7 @@ static int cipso_v4_map_lvl_ntoh(const struct cipso_v4_doi *doi_def,
771 *host_lvl = doi_def->map.std->lvl.cipso[net_lvl]; 772 *host_lvl = doi_def->map.std->lvl.cipso[net_lvl];
772 return 0; 773 return 0;
773 } 774 }
774 break; 775 return -EPERM;
775 } 776 }
776 777
777 return -EINVAL; 778 return -EINVAL;