summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-01-14 01:21:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-01-14 01:21:53 +0000
commitce1070acfcae9d00e7bd40c41d92f9bb23ce6de0 (patch)
treeb83b7a3d176dfda0800775c31f56b656d0c5a50d /openwrt
parent2aa55f21d55a57c85fcc6de6f08b96d9adf04f16 (diff)
downloadmtk-20170518-ce1070acfcae9d00e7bd40c41d92f9bb23ce6de0.zip
mtk-20170518-ce1070acfcae9d00e7bd40c41d92f9bb23ce6de0.tar.gz
mtk-20170518-ce1070acfcae9d00e7bd40c41d92f9bb23ce6de0.tar.bz2
add ip address parameter to netmsg utility
SVN-Revision: 2967
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/package/busybox/patches/300-netmsg.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/openwrt/package/busybox/patches/300-netmsg.patch b/openwrt/package/busybox/patches/300-netmsg.patch
index ac1a0aa..22ca172 100644
--- a/openwrt/package/busybox/patches/300-netmsg.patch
+++ b/openwrt/package/busybox/patches/300-netmsg.patch
@@ -63,8 +63,8 @@ diff -urN busybox.old/networking/netmsg.c busybox.dev/networking/netmsg.c
+ int optval = 1;
+ unsigned char buf[1001];
+
-+ if (argc != 2) {
-+ fprintf(stderr, "usage: %s \"message\"\n", argv[0]);
++ if (argc != 3) {
++ fprintf(stderr, "usage: %s <ip> \"<message>\"\n", argv[0]);
+ exit(1);
+ }
+
@@ -75,14 +75,14 @@ diff -urN busybox.old/networking/netmsg.c busybox.dev/networking/netmsg.c
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sin_family = AF_INET;
-+ addr.sin_addr.s_addr = htonl(0xffffffff);
++ addr.sin_addr.s_addr = inet_addr(argv[1]);
+ addr.sin_port = htons(0x1337);
+
+ memset(buf, 0, 1001);
+ buf[0] = 0xde;
+ buf[1] = 0xad;
+
-+ strncpy(buf + 2, argv[1], 998);
++ strncpy(buf + 2, argv[2], 998);
+
+ if (setsockopt (s, SOL_SOCKET, SO_BROADCAST, (caddr_t) &optval, sizeof (optval)) < 0) {
+ perror("setsockopt()");