aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-02-29 11:06:47 -0500
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-03-04 01:18:22 -0500
commite898d4db2749c6052072e9bc4448e396cbdeb06a (patch)
tree2b8673d85210a23e67d0817b18f401411e8936f3 /net/ipv4/af_inet.c
parentc6aefafb7ec620911d46174eed514f9df639e5a4 (diff)
[UDP]: Allow users to configure UDP-Lite.
Let's give users an option for disabling UDP-Lite (~4K). old: | text data bss dec hex filename | 286498 12432 6072 305002 4a76a net/ipv4/built-in.o | 193830 8192 3204 205226 321aa net/ipv6/ipv6.o new (without UDP-Lite): | text data bss dec hex filename | 284086 12136 5432 301654 49a56 net/ipv4/built-in.o | 191835 7832 3076 202743 317f7 net/ipv6/ipv6.o Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 4f539bd48718..67260c0eaaa8 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1317,15 +1317,18 @@ static int __init init_ipv4_mibs(void)
1317 if (snmp_mib_init((void **)udp_statistics, 1317 if (snmp_mib_init((void **)udp_statistics,
1318 sizeof(struct udp_mib)) < 0) 1318 sizeof(struct udp_mib)) < 0)
1319 goto err_udp_mib; 1319 goto err_udp_mib;
1320#ifdef CONFIG_IP_UDPLITE
1320 if (snmp_mib_init((void **)udplite_statistics, 1321 if (snmp_mib_init((void **)udplite_statistics,
1321 sizeof(struct udp_mib)) < 0) 1322 sizeof(struct udp_mib)) < 0)
1322 goto err_udplite_mib; 1323 goto err_udplite_mib;
1323 1324#endif
1324 tcp_mib_init(); 1325 tcp_mib_init();
1325 1326
1326 return 0; 1327 return 0;
1327 1328
1329#ifdef CONFIG_IP_UDPLITE
1328err_udplite_mib: 1330err_udplite_mib:
1331#endif
1329 snmp_mib_free((void **)udp_statistics); 1332 snmp_mib_free((void **)udp_statistics);
1330err_udp_mib: 1333err_udp_mib:
1331 snmp_mib_free((void **)tcp_statistics); 1334 snmp_mib_free((void **)tcp_statistics);
@@ -1423,8 +1426,10 @@ static int __init inet_init(void)
1423 /* Setup UDP memory threshold */ 1426 /* Setup UDP memory threshold */
1424 udp_init(); 1427 udp_init();
1425 1428
1429#ifdef CONFIG_IP_UDPLITE
1426 /* Add UDP-Lite (RFC 3828) */ 1430 /* Add UDP-Lite (RFC 3828) */
1427 udplite4_register(); 1431 udplite4_register();
1432#endif
1428 1433
1429 /* 1434 /*
1430 * Set the ICMP layer up 1435 * Set the ICMP layer up