@@ -244,7 +244,7 @@ EXPORT_SYMBOL(build_ehash_secret);
244244static inline int inet_netns_ok (struct net * net , int protocol )
245245{
246246 int hash ;
247- struct net_protocol * ipprot ;
247+ const struct net_protocol * ipprot ;
248248
249249 if (net_eq (net , & init_net ))
250250 return 1 ;
@@ -1162,7 +1162,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header);
11621162static int inet_gso_send_check (struct sk_buff * skb )
11631163{
11641164 struct iphdr * iph ;
1165- struct net_protocol * ops ;
1165+ const struct net_protocol * ops ;
11661166 int proto ;
11671167 int ihl ;
11681168 int err = - EINVAL ;
@@ -1198,7 +1198,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
11981198{
11991199 struct sk_buff * segs = ERR_PTR (- EINVAL );
12001200 struct iphdr * iph ;
1201- struct net_protocol * ops ;
1201+ const struct net_protocol * ops ;
12021202 int proto ;
12031203 int ihl ;
12041204 int id ;
@@ -1265,7 +1265,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
12651265static struct sk_buff * * inet_gro_receive (struct sk_buff * * head ,
12661266 struct sk_buff * skb )
12671267{
1268- struct net_protocol * ops ;
1268+ const struct net_protocol * ops ;
12691269 struct sk_buff * * pp = NULL ;
12701270 struct sk_buff * p ;
12711271 struct iphdr * iph ;
@@ -1342,7 +1342,7 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
13421342
13431343static int inet_gro_complete (struct sk_buff * skb )
13441344{
1345- struct net_protocol * ops ;
1345+ const struct net_protocol * ops ;
13461346 struct iphdr * iph = ip_hdr (skb );
13471347 int proto = iph -> protocol & (MAX_INET_PROTOS - 1 );
13481348 int err = - ENOSYS ;
@@ -1427,13 +1427,13 @@ void snmp_mib_free(void *ptr[2])
14271427EXPORT_SYMBOL_GPL (snmp_mib_free );
14281428
14291429#ifdef CONFIG_IP_MULTICAST
1430- static struct net_protocol igmp_protocol = {
1430+ static const struct net_protocol igmp_protocol = {
14311431 .handler = igmp_rcv ,
14321432 .netns_ok = 1 ,
14331433};
14341434#endif
14351435
1436- static struct net_protocol tcp_protocol = {
1436+ static const struct net_protocol tcp_protocol = {
14371437 .handler = tcp_v4_rcv ,
14381438 .err_handler = tcp_v4_err ,
14391439 .gso_send_check = tcp_v4_gso_send_check ,
@@ -1444,7 +1444,7 @@ static struct net_protocol tcp_protocol = {
14441444 .netns_ok = 1 ,
14451445};
14461446
1447- static struct net_protocol udp_protocol = {
1447+ static const struct net_protocol udp_protocol = {
14481448 .handler = udp_rcv ,
14491449 .err_handler = udp_err ,
14501450 .gso_send_check = udp4_ufo_send_check ,
@@ -1453,7 +1453,7 @@ static struct net_protocol udp_protocol = {
14531453 .netns_ok = 1 ,
14541454};
14551455
1456- static struct net_protocol icmp_protocol = {
1456+ static const struct net_protocol icmp_protocol = {
14571457 .handler = icmp_rcv ,
14581458 .no_policy = 1 ,
14591459 .netns_ok = 1 ,
0 commit comments