diff options
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 6c30a73f03f5..58c4b0f7c4aa 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -244,7 +244,7 @@ EXPORT_SYMBOL(build_ehash_secret); | |||
244 | static inline int inet_netns_ok(struct net *net, int protocol) | 244 | static inline int inet_netns_ok(struct net *net, int protocol) |
245 | { | 245 | { |
246 | int hash; | 246 | int hash; |
247 | struct net_protocol *ipprot; | 247 | const struct net_protocol *ipprot; |
248 | 248 | ||
249 | if (net_eq(net, &init_net)) | 249 | if (net_eq(net, &init_net)) |
250 | return 1; | 250 | return 1; |
@@ -1162,7 +1162,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header); | |||
1162 | static int inet_gso_send_check(struct sk_buff *skb) | 1162 | static int inet_gso_send_check(struct sk_buff *skb) |
1163 | { | 1163 | { |
1164 | struct iphdr *iph; | 1164 | struct iphdr *iph; |
1165 | struct net_protocol *ops; | 1165 | const struct net_protocol *ops; |
1166 | int proto; | 1166 | int proto; |
1167 | int ihl; | 1167 | int ihl; |
1168 | int err = -EINVAL; | 1168 | int err = -EINVAL; |
@@ -1198,7 +1198,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) | |||
1198 | { | 1198 | { |
1199 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 1199 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
1200 | struct iphdr *iph; | 1200 | struct iphdr *iph; |
1201 | struct net_protocol *ops; | 1201 | const struct net_protocol *ops; |
1202 | int proto; | 1202 | int proto; |
1203 | int ihl; | 1203 | int ihl; |
1204 | int id; | 1204 | int id; |
@@ -1265,7 +1265,7 @@ out: | |||
1265 | static struct sk_buff **inet_gro_receive(struct sk_buff **head, | 1265 | static struct sk_buff **inet_gro_receive(struct sk_buff **head, |
1266 | struct sk_buff *skb) | 1266 | struct sk_buff *skb) |
1267 | { | 1267 | { |
1268 | struct net_protocol *ops; | 1268 | const struct net_protocol *ops; |
1269 | struct sk_buff **pp = NULL; | 1269 | struct sk_buff **pp = NULL; |
1270 | struct sk_buff *p; | 1270 | struct sk_buff *p; |
1271 | struct iphdr *iph; | 1271 | struct iphdr *iph; |
@@ -1342,7 +1342,7 @@ out: | |||
1342 | 1342 | ||
1343 | static int inet_gro_complete(struct sk_buff *skb) | 1343 | static int inet_gro_complete(struct sk_buff *skb) |
1344 | { | 1344 | { |
1345 | struct net_protocol *ops; | 1345 | const struct net_protocol *ops; |
1346 | struct iphdr *iph = ip_hdr(skb); | 1346 | struct iphdr *iph = ip_hdr(skb); |
1347 | int proto = iph->protocol & (MAX_INET_PROTOS - 1); | 1347 | int proto = iph->protocol & (MAX_INET_PROTOS - 1); |
1348 | int err = -ENOSYS; | 1348 | int err = -ENOSYS; |
@@ -1427,13 +1427,13 @@ void snmp_mib_free(void *ptr[2]) | |||
1427 | EXPORT_SYMBOL_GPL(snmp_mib_free); | 1427 | EXPORT_SYMBOL_GPL(snmp_mib_free); |
1428 | 1428 | ||
1429 | #ifdef CONFIG_IP_MULTICAST | 1429 | #ifdef CONFIG_IP_MULTICAST |
1430 | static struct net_protocol igmp_protocol = { | 1430 | static const struct net_protocol igmp_protocol = { |
1431 | .handler = igmp_rcv, | 1431 | .handler = igmp_rcv, |
1432 | .netns_ok = 1, | 1432 | .netns_ok = 1, |
1433 | }; | 1433 | }; |
1434 | #endif | 1434 | #endif |
1435 | 1435 | ||
1436 | static struct net_protocol tcp_protocol = { | 1436 | static const struct net_protocol tcp_protocol = { |
1437 | .handler = tcp_v4_rcv, | 1437 | .handler = tcp_v4_rcv, |
1438 | .err_handler = tcp_v4_err, | 1438 | .err_handler = tcp_v4_err, |
1439 | .gso_send_check = tcp_v4_gso_send_check, | 1439 | .gso_send_check = tcp_v4_gso_send_check, |
@@ -1444,7 +1444,7 @@ static struct net_protocol tcp_protocol = { | |||
1444 | .netns_ok = 1, | 1444 | .netns_ok = 1, |
1445 | }; | 1445 | }; |
1446 | 1446 | ||
1447 | static struct net_protocol udp_protocol = { | 1447 | static const struct net_protocol udp_protocol = { |
1448 | .handler = udp_rcv, | 1448 | .handler = udp_rcv, |
1449 | .err_handler = udp_err, | 1449 | .err_handler = udp_err, |
1450 | .gso_send_check = udp4_ufo_send_check, | 1450 | .gso_send_check = udp4_ufo_send_check, |
@@ -1453,7 +1453,7 @@ static struct net_protocol udp_protocol = { | |||
1453 | .netns_ok = 1, | 1453 | .netns_ok = 1, |
1454 | }; | 1454 | }; |
1455 | 1455 | ||
1456 | static struct net_protocol icmp_protocol = { | 1456 | static const struct net_protocol icmp_protocol = { |
1457 | .handler = icmp_rcv, | 1457 | .handler = icmp_rcv, |
1458 | .no_policy = 1, | 1458 | .no_policy = 1, |
1459 | .netns_ok = 1, | 1459 | .netns_ok = 1, |