Guest User

Disable UPD Lite - method 2 (fixed)

a guest
Jun 15th, 2026
75
0
320 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.13 KB | Software | 0 0
  1. diff '--color=auto' -u20 -r a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
  2. --- a/net/ipv4/af_inet.c    2026-06-09 13:28:53.000000000 +0300
  3. +++ b/net/ipv4/af_inet.c    2026-06-15 16:27:15.810080729 +0300
  4. @@ -1959,41 +1959,41 @@
  5.  
  6.     arp_init();
  7.  
  8.     /*
  9.      *  Set the IP module up
  10.      */
  11.  
  12.     ip_init();
  13.  
  14.     /* Initialise per-cpu ipv4 mibs */
  15.     if (init_ipv4_mibs())
  16.         panic("%s: Cannot init ipv4 mibs\n", __func__);
  17.  
  18.     /* Setup TCP slab cache for open requests. */
  19.     tcp_init();
  20.  
  21.     /* Setup UDP memory threshold */
  22.     udp_init();
  23.  
  24.     /* Add UDP-Lite (RFC 3828) */
  25. -   udplite4_register();
  26. +   // udplite4_register();
  27.  
  28.     raw_init();
  29.  
  30.     ping_init();
  31.  
  32.     /*
  33.      *  Set the ICMP layer up
  34.      */
  35.  
  36.     if (icmp_init() < 0)
  37.         panic("Failed to create the ICMP control socket.\n");
  38.  
  39.     /*
  40.      *  Initialise the multicast router
  41.      */
  42.  #if defined(CONFIG_IP_MROUTE)
  43.     if (ip_mr_init())
  44.         pr_crit("%s: Cannot init ipv4 mroute\n", __func__);
  45.  #endif
  46.  
  47. diff '--color=auto' -u20 -r a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
  48. --- a/net/ipv6/af_inet6.c   2026-06-09 13:28:53.000000000 +0300
  49. +++ b/net/ipv6/af_inet6.c   2026-06-15 16:27:47.118081323 +0300
  50. @@ -1079,43 +1079,43 @@
  51.  
  52.     /* Register the socket-side information for inet6_create.  */
  53.     for (r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r)
  54.         INIT_LIST_HEAD(r);
  55.  
  56.     raw_hashinfo_init(&raw_v6_hashinfo);
  57.  
  58.     if (disable_ipv6_mod) {
  59.         pr_info("Loaded, but administratively disabled, reboot required to enable\n");
  60.         goto out;
  61.     }
  62.  
  63.     err = proto_register(&tcpv6_prot, 1);
  64.     if (err)
  65.         goto out;
  66.  
  67.     err = proto_register(&udpv6_prot, 1);
  68.     if (err)
  69.         goto out_unregister_tcp_proto;
  70.  
  71. -   err = proto_register(&udplitev6_prot, 1);
  72. -   if (err)
  73. -       goto out_unregister_udp_proto;
  74. +   // err = proto_register(&udplitev6_prot, 1);
  75. +   // if (err)
  76. +   //  goto out_unregister_udp_proto;
  77.  
  78.     err = proto_register(&rawv6_prot, 1);
  79.     if (err)
  80.         goto out_unregister_udplite_proto;
  81.  
  82.     err = proto_register(&pingv6_prot, 1);
  83.     if (err)
  84.         goto out_unregister_raw_proto;
  85.  
  86.     /* We MUST register RAW sockets before we create the ICMP6,
  87.      * IGMP6, or NDISC control sockets.
  88.      */
  89.     err = rawv6_init();
  90.     if (err)
  91.         goto out_unregister_ping_proto;
  92.  
  93.     /* Register the family here so that the init calls below will
  94.      * be able to create sockets. (?? is this dangerous ??)
  95.      */
  96.     err = sock_register(&inet6_family_ops);
  97. @@ -1296,30 +1296,30 @@
  98.  netfilter_fail:
  99.     igmp6_cleanup();
  100.  igmp_fail:
  101.     ndisc_cleanup();
  102.  ndisc_fail:
  103.     icmpv6_cleanup();
  104.  icmp_fail:
  105.     ip6_mr_cleanup();
  106.  ipmr_fail:
  107.     unregister_pernet_subsys(&inet6_net_ops);
  108.  register_pernet_fail:
  109.     sock_unregister(PF_INET6);
  110.     rtnl_unregister_all(PF_INET6);
  111.  out_sock_register_fail:
  112.     rawv6_exit();
  113.  out_unregister_ping_proto:
  114.     proto_unregister(&pingv6_prot);
  115.  out_unregister_raw_proto:
  116.     proto_unregister(&rawv6_prot);
  117.  out_unregister_udplite_proto:
  118. -   proto_unregister(&udplitev6_prot);
  119. +   // proto_unregister(&udplitev6_prot);
  120.  out_unregister_udp_proto:
  121.     proto_unregister(&udpv6_prot);
  122.  out_unregister_tcp_proto:
  123.     proto_unregister(&tcpv6_prot);
  124.     goto out;
  125.  }
  126.  module_init(inet6_init);
  127.  
  128.  MODULE_ALIAS_NETPROTO(PF_INET6);
  129.  
Advertisement
Add Comment
Please, Sign In to add comment