summaryrefslogtreecommitdiffstats
path: root/package/l2tp/l2tp-no-gnu-extensions.patch
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-31 21:22:33 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-31 21:22:33 +0000
commit9e453fb42d369968b461abc7d7d1b05199a48de7 (patch)
treea334aee1cdb588e2bf2dda6999d1c5c0ede857cf /package/l2tp/l2tp-no-gnu-extensions.patch
parentf0be91fd176ab4816eb1219f1f392b3b3edb0665 (diff)
downloadbuildroot-novena-9e453fb42d369968b461abc7d7d1b05199a48de7.tar.gz
buildroot-novena-9e453fb42d369968b461abc7d7d1b05199a48de7.zip
- add a layer 2 tunneling protocol package
Diffstat (limited to 'package/l2tp/l2tp-no-gnu-extensions.patch')
-rw-r--r--package/l2tp/l2tp-no-gnu-extensions.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/l2tp/l2tp-no-gnu-extensions.patch b/package/l2tp/l2tp-no-gnu-extensions.patch
new file mode 100644
index 000000000..ef07e26f5
--- /dev/null
+++ b/package/l2tp/l2tp-no-gnu-extensions.patch
@@ -0,0 +1,33 @@
+--- l2tpd-0.70-pre20031121.oorig/avpsend.c 2006-12-28 16:00:26.000000000 +0100
++++ l2tpd-0.70-pre20031121/avpsend.c 2006-12-28 16:21:06.000000000 +0100
+@@ -98,19 +98,26 @@ int add_hostname_avp(struct buffer *buf,
+ int sz = 0;
+ if(t->lac && t->lac->hostname[0]) {
+ strncpy(n,t->lac->hostname, sizeof(n));
+- sz = strnlen(t->lac->hostname, sizeof(t->lac->hostname));
++ sz = strlen(t->lac->hostname);
++ if (sz > sizeof(t->lac->hostname))
++ sz = sizeof(t->lac->hostname);
+ }
+ else if(t->lns && t->lns->hostname[0]) {
+ strncpy(n,t->lns->hostname, sizeof(n));
+- sz = strnlen(t->lns->hostname, sizeof(t->lns->hostname));
++ sz = strlen(t->lns->hostname);
++ if (sz > sizeof(t->lns->hostname))
++ sz = sizeof(t->lns->hostname);
+ }
+ else {
+ if(gethostname(n, STRLEN)) {
+ strcpy(n,"eriwan");
+ sz = 6;
+ }
+- else
+- sz = strnlen(n, sizeof(n));
++ else {
++ sz = strlen(n);
++ if (sz > sizeof(n))
++ sz = sizeof(n);
++ }
+ }
+ if(add_avp(buf, HOSTNAME_AVP, n, sz, 1))
+ return 1;