Skip to contentSkip to conversation

Fix various typos and nitpicks

PATCH In review Andreas Henriksson 3 participants 25 messages Oct 12, 2007 – Oct 18, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/12 Fix various typos and nitpicks

From: Alexander Wirt <[email protected]>

Fix typo in ss manpage.
Make the backslash visible in ip manpage (http://bugs.debian.org/285507).
Strict syntax for ip addr advice in error message.
Fix typo in libnetlink(3) manpage (writen -> written).
Fix typos in tc-prio(8) manpage.
Fix typo in tc-htb(8) manpage (mininum -> minimum).
Fix typo in tc-cbq-details(8) manpage (occured -> occurred).

---
 ip/ipaddress.c            |    2 +-
 man/man3/libnetlink.3     |    2 +-
 man/man8/ip.8             |    2 +-
 man/man8/ss.8             |    2 +-
 man/man8/tc-cbq-details.8 |    2 +-
 man/man8/tc-htb.8         |    2 +-
 man/man8/tc-prio.8        |    8 ++++----
 7 files changed, 10 insertions(+), 10 deletions(-)
ip/ipaddress.c +1 -1
index 518d8cd..d1c6620 100644
@@ -1019,7 +1019,7 @@ int do_ipaddr(int argc, char **argv)
 		return ipaddr_list_or_flush(argc-1, argv+1, 1);
 	if (matches(*argv, "help") == 0)
 		usage();
-	fprintf(stderr, "Command \"%s\" is unknown, try \"ip address help\".\n", *argv);
+	fprintf(stderr, "Command \"%s\" is unknown, try \"ip addr help\".\n", *argv);
 	exit(-1);
 }
 
man/man3/libnetlink.3 +1 -1
index 145f38d..15a478a 100644
@@ -187,7 +187,7 @@ The functions sometimes use fprintf and exit when a fatal error occurs.
 This library should be named librtnetlink.
 
 .SH AUTHORS
-netlink/rtnetlink was designed and writen by Alexey Kuznetsov.
+netlink/rtnetlink was designed and written by Alexey Kuznetsov.
 Andi Kleen wrote the man page.
 
 .SH SEE ALSO
man/man8/ip.8 +1 -1
index 7181054..153123a 100644
@@ -379,7 +379,7 @@ shortcut for
 .BR "\-o" , " \-oneline"
 output each record on a single line, replacing line feeds
 with the
-.B '\'
+.B '\e\'
 character. This is convenient when you want to count records 
 with
 .BR wc (1)
man/man8/ss.8 +1 -1
index f732319..19f341e 100644
@@ -9,7 +9,7 @@ ss \- another utility to investigate sockets
 is used to dump socket statistics. It allows showing information similar
 to
 .IR netstat .
-It can display more TCP information than state than other tools.
+It can display more TCP and state informations than other tools.
 
 .SH OPTIONS
 These programs follow the usual GNU command line syntax, with long
man/man8/tc-cbq-details.8 +1 -1
index e47da62..09badb9 100644
@@ -210,7 +210,7 @@ Consult the map for a class for the
 priority. If found, choose it, and terminate.
 .TP
 (iii)
-Choose the class at which break out to the fallback algorithm occured. Terminate.
+Choose the class at which break out to the fallback algorithm occurred. Terminate.
 .P
 The packet is enqueued to the class which was chosen when either algorithm 
 terminated. It is therefore possible for a packet to be enqueued *not* at a
man/man8/tc-htb.8 +1 -1
index f61b818..d196ecd 100644
@@ -137,7 +137,7 @@ packet. Should be at least as high as the highest cburst of all children.
 .SH NOTES
 Due to Unix timing constraints, the maximum ceil rate is not infinite and may in fact be quite low. On Intel, 
 there are 100 timer events per second, the maximum rate is that rate at which 'burst' bytes are sent each timer tick.
-From this, the mininum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte 
+From this, the minimum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte 
 burst as 100*12kb*8 equals 10mbit.
 
 .SH SEE ALSO
man/man8/tc-prio.8 +4 -4
index e942e62..780bcd5 100644
@@ -30,7 +30,7 @@ traffic.
 On creation with 'tc qdisc add', a fixed number of bands is created. Each
 band is a class, although is not possible to add classes with 'tc qdisc
 add', the number of bands to be created must instead be specified on the
-commandline attaching PRIO to its root.
+command line attaching PRIO to its root.
 
 When dequeueing, band 0 is tried first and only if it did not deliver a
 packet does PRIO try band 1, and so onwards. Maximum reliability packets
@@ -88,7 +88,7 @@ this:
 The four TOS bits (the 'TOS field') are defined as:
 
 .nf
-Binary Decimcal  Meaning
+Binary Decimal  Meaning
 -----------------------------------------
 1000   8         Minimize delay (md)
 0100   4         Maximize throughput (mt)
@@ -125,13 +125,13 @@ TOS     Bits  Means                    Linux Priority    Band
 
 The second column contains the value of the relevant
 four TOS bits, followed by their translated meaning. For example, 15 stands
-for a packet wanting Minimal Montetary Cost, Maximum Reliability, Maximum
+for a packet wanting Minimal Monetary Cost, Maximum Reliability, Maximum
 Throughput AND Minimum Delay. 
 
 The fourth column lists the way the Linux kernel interprets the TOS bits, by
 showing to which Priority they are mapped.
 
-The last column shows the result of the default priomap. On the commandline,
+The last column shows the result of the default priomap. On the command line,
 the default priomap looks like this:
 
     1, 2, 2, 2, 1, 2, 0, 0 , 1, 1, 1, 1, 1, 1, 1, 1
Signature · 1 line
1.5.3.4
#1 lore raw

PATCH 2/12 Add parameters to usage help text.

From: Alexander Wirt <[email protected]>

Add src option to route help text (http://bugs.debian.org/226142).
Add prio option to rule prio help text (http://bugs.debian.org/213673).

---
 ip/iproute.c |    2 +-
 ip/iprule.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
ip/iproute.c +1 -1
index 77bdf83..d3a3243 100644
@@ -74,7 +74,7 @@ static void usage(void)
 	fprintf(stderr, "OPTIONS := FLAGS [ mtu NUMBER ] [ advmss NUMBER ]\n");
 	fprintf(stderr, "           [ rtt TIME ] [ rttvar TIME ]\n");
 	fprintf(stderr, "           [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
-	fprintf(stderr, "           [ ssthresh NUMBER ] [ realms REALM ]\n");
+	fprintf(stderr, "           [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
 	fprintf(stderr, "           [ rto_min TIME ]\n");
 	fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
 	fprintf(stderr, "          unreachable | prohibit | blackhole | nat ]\n");
ip/iprule.c +1 -1
index e1a943a..0f7c223 100644
@@ -38,7 +38,7 @@ static void usage(void)
 {
 	fprintf(stderr, "Usage: ip rule [ list | add | del | flush ] SELECTOR ACTION\n");
 	fprintf(stderr, "SELECTOR := [ not ] [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK[/MASK] ]\n");
-	fprintf(stderr, "            [ dev STRING ] [ pref NUMBER ]\n");
+	fprintf(stderr, "            [ dev STRING ] [ pref NUMBER ] [ prio NUMBER ]\n");
 	fprintf(stderr, "ACTION := [ table TABLE_ID ]\n");
 	fprintf(stderr, "          [ prohibit | reject | unreachable ]\n");
 	fprintf(stderr, "          [ realms [SRCREALM/]DSTREALM ]\n");
Signature · 1 line
1.5.3.4
#2 lore raw

PATCH 3/12 Prevent renaming interfaces to empty string.

From: Alexander Wirt <[email protected]>

---
 ip/iplink.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
ip/iplink.c +4 -0
index 4060845..da1f64e 100644
@@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
 	}
 
 	if (newname && strcmp(dev, newname)) {
+		if (strlen(newname) == 0) {
+		    printf("\"\" is not valid device identifier\n");
+		    return -1;
+		}
 		if (do_changename(dev, newname) < 0)
 			return -1;
 		dev = newname;
Signature · 1 line
1.5.3.4
#3 lore raw

PATCH 4/12 Fix up various problems in netbug script.

From: Javier Fernández-Sanguino Peña <[email protected]>

Fix race conditions and temporary file symlink attacks. See http://bugs.debian.org/289541

Additional improvements by Allard Hoeve <[email protected]> and others. See http://bugs.debian.org/313540, http://bugs.debian.org/313541,
and http://bugs.debian.org/313544.

---
 misc/netbug |   24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)
misc/netbug +8 -16
index 6d13c8e..7b6ecea 100644
@@ -1,23 +1,16 @@
 #! /bin/bash
 
+set -e
+
 echo -n "Send network configuration summary to [ENTER means [email protected]] "
 IFS="" read mail || exit 1
 [ -z "$mail" ] && [email protected]
 
+netbug=`mktemp -d -t netbug.XXXXXX` || (echo "$0: Cannot create temporary directory" >&2; exit 1; )
+netbugtar=`tempfile -d $netbug --suffix=tar.gz` || (echo "$0: Cannot create temporary file" >&2; exit 1; )
+tmppath=$netbug
+trap "/bin/rm -rf $netbug $netbugtar" 0 1 2 3 13 15
 
-netbug=""
-while [ "$netbug" = "" ]; do
-	netbug=`echo netbug.$$.$RANDOM`
-	if [ -e /tmp/$netbug ]; then
-		netbug=""
-	fi
-done
-
-tmppath=/tmp/$netbug
-
-trap "rm -rf $tmppath $tmppath.tar.gz" 0 SIGINT
-
-mkdir $tmppath
 mkdir $tmppath/net
 
 cat /proc/slabinfo > $tmppath/slabinfo
@@ -44,9 +37,8 @@ if [ -e /proc/net/tcp6 ]; then
 fi
 
 cd /tmp
-tar c $netbug | gzip -9c > $netbug.tar.gz
-
-uuencode $netbug.tar.gz $netbug.tar.gz | mail -s $netbug "$mail"
+tar c $tmppath | gzip -9c > $netbugtar
+uuencode $netbugtar $netbugtar | mail -s $netbug "$mail"
 
 echo "Sending to <$mail>; subject is $netbug"
 
Signature · 1 line
1.5.3.4
#4 lore raw

PATCH 5/12 Fix typo in tunnel code (o_key vs. i_key).

From: Herbert Xu <[email protected]>

If a dotted quad ikey is specified for GRE tunnels, it gets set as the okey instead. This patch fixes it. (http://bugs.debian.org/200714)

---
 ip/iptunnel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
ip/iptunnel.c +1 -1
index 828d80a..aee526b 100644
@@ -113,7 +113,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
 			NEXT_ARG();
 			p->i_flags |= GRE_KEY;
 			if (strchr(*argv, '.'))
-				p->o_key = get_addr32(*argv);
+				p->i_key = get_addr32(*argv);
 			else {
 				if (get_unsigned(&uval, *argv, 0)<0) {
 					fprintf(stderr, "invalid value of \"ikey\"\n");
Signature · 1 line
1.5.3.4
#5 lore raw

PATCH 6/12 Remove bogus reference to tc-filters(8) from tc(8) manpage.

From: Andreas Barth <[email protected]>

Spotted by Aleš Kozumplík <[email protected]>
(http://bugs.debian.org/289225)

---
 man/man8/tc.8 |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
man/man8/tc.8 +2 -4
index b9b8039..6acd572 100644
@@ -202,8 +202,7 @@ qdiscs will use all three:
 tc filters
 If tc filters are attached to a class, they are consulted first 
 for relevant instructions. Filters can match on all fields of a packet header, 
-as well as on the firewall mark applied by ipchains or iptables. See 
-.BR tc-filters (8).
+as well as on the firewall mark applied by ipchains or iptables. 
 .TP
 Type of Service
 Some qdiscs have built in rules for classifying packets based on the TOS field.
@@ -242,8 +241,7 @@ qdiscs applies.
 .TP 
 FILTERS
 Filters have a three part ID, which is only needed when using a hashed
-filter hierarchy, for which see
-.BR tc-filters (8).
+filter hierarchy.
 .SH UNITS
 All parameters accept a floating point number, possibly followed by a unit.
 .P
Signature · 1 line
1.5.3.4
#6 lore raw

PATCH 7/12 Fix corruption when using batch files with comments and broken lines.

I could only reproduce on some old pentium machine, don't know why. Anyway, the patch fixes a problem resulting in a double free that occurs when using batch files that contains a special combination of broken up lines and comments as reported in:
http://bugs.debian.org/398912

Thanks to Michal Pokrywka <[email protected]> for testcase and information on which conditions problem could be reproduced under.

---
 include/utils.h |    2 +-
 lib/utils.c     |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
include/utils.h +1 -1
index 7da2b29..9ee55fd 100644
@@ -144,7 +144,7 @@ int print_timestamp(FILE *fp);
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 extern int cmdlineno;
-extern size_t getcmdline(char **line, size_t *len, FILE *in);
+extern ssize_t getcmdline(char **line, size_t *len, FILE *in);
 extern int makeargs(char *line, char *argv[], int maxargs);
 
 #endif /* __UTILS_H__ */
lib/utils.c +5 -3
index 4c42dfd..ffef6fe 100644
@@ -642,9 +642,9 @@ int print_timestamp(FILE *fp)
 int cmdlineno;
 
 /* Like glibc getline but handle continuation lines and comments */
-size_t getcmdline(char **linep, size_t *lenp, FILE *in)
+ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
 {
-	size_t cc;
+	ssize_t cc;
 	char *cp;
 
 	if ((cc = getline(linep, lenp, in)) < 0)
@@ -672,9 +672,11 @@ size_t getcmdline(char **linep, size_t *lenp, FILE *in)
 		if (cp)
 			*cp = '\0';
 
-		*linep = realloc(*linep, strlen(*linep) + strlen(line1) + 1);
+		*lenp = strlen(*linep) + strlen(line1) + 1;
+		*linep = realloc(*linep, *lenp);
 		if (!*linep) {
 			fprintf(stderr, "Out of memory\n");
+			*lenp = 0;
 			return -1;
 		}
 		cc += cc1 - 2;
Signature · 1 line
1.5.3.4
#7 lore raw

PATCH 8/12 Fix ematch cmp and nbyte syntax help text.

From: Lionel Elie Mamane <[email protected]>

The help/usage screen of ematch cmp and nbyte say recognised symbolic values for "layer FOO" are link, header and next-header, but the code does _not_ implement that: it will recognise "next-header" as what is supposed to be "header" and will not recognise "header". The right symbolic values seem to be link, network, transport. Here is a patch that changes the help/usage screen to match the code.
(http://bugs.debian.org/438653)

---
 tc/em_cmp.c   |    4 ++--
 tc/em_nbyte.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tc/em_cmp.c +2 -2
index b8f9b46..ce72a42 100644
@@ -1,5 +1,5 @@
 /*
- * em_cmp.c		Simle coparison Ematch
+ * em_cmp.c		Simple comparison Ematch
  *
  *		This program is free software; you can distribute it and/or
  *		modify it under the terms of the GNU General Public License
@@ -32,7 +32,7 @@ static void cmp_print_usage(FILE *fd)
 	    "Usage: cmp(ALIGN at OFFSET [ ATTRS ] { eq | lt | gt } VALUE)\n" \
 	    "where: ALIGN  := { u8 | u16 | u32 }\n" \
 	    "       ATTRS  := [ layer LAYER ] [ mask MASK ] [ trans ]\n" \
-	    "       LAYER  := { link | header | next-header | 0..%d }\n" \
+	    "       LAYER  := { link | network | transport | 0..%d }\n" \
 	    "\n" \
 	    "Example: cmp(u16 at 3 layer 2 mask 0xff00 gt 20)\n",
 	    TCF_LAYER_MAX);
tc/em_nbyte.c +1 -1
index 98f9883..242c361 100644
@@ -32,7 +32,7 @@ static void nbyte_print_usage(FILE *fd)
 	    "Usage: nbyte(NEEDLE at OFFSET [layer LAYER])\n" \
 	    "where: NEEDLE := { string | \"c-escape-sequence\" }\n" \
 	    "       OFFSET := int\n" \
-	    "       LAYER  := { link | header | next-header | 0..%d }\n" \
+	    "       LAYER  := { link | network | transport | 0..%d }\n" \
 	    "\n" \
 	    "Example: nbyte(\"ababa\" at 12 layer 1)\n",
 	    TCF_LAYER_MAX);
Signature · 1 line
1.5.3.4
#8 lore raw

PATCH 9/12 Add new rtacct/nstat manpages and additional symlinks.

Symlink rtstat(8) and ctstat(8) to lnstat(8).
Add rtacct/nstat manpage based on doc/nstat.sgml as rtacct(8). Symlink nstat(8) to rtacct(8).
Add arpd(8) symlink based on doc/arpd.sgml.

---
 Makefile          |    3 ++
 man/man8/arpd.8   |   66 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/man8/rtacct.8 |   48 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 117 insertions(+), 0 deletions(-)
 create mode 100644 man/man8/arpd.8
 create mode 100644 man/man8/rtacct.8
Makefile +3 -0
index af0d5e4..6c976dd 100644
@@ -53,6 +53,9 @@ install: all
 	install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
 	install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
 	ln -sf tc-bfifo.8  $(DESTDIR)$(MANDIR)/man8/tc-pfifo.8
+	ln -sf lnstat.8  $(DESTDIR)$(MANDIR)/man8/rtstat.8
+	ln -sf lnstat.8  $(DESTDIR)$(MANDIR)/man8/ctstat.8
+	ln -sf rtacct.8  $(DESTDIR)$(MANDIR)/man8/nstat.8
 	install -m 0755 -d $(DESTDIR)$(MANDIR)/man3
 	install -m 0644 $(shell find man/man3 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man3
 
man/man8/arpd.8 new file +66 -0

66 lines not on this page · raw message

man/man8/rtacct.8 new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.5.3.4
#9 lore raw

PATCH 10/12 Fix off-by-one in print of wrandom algo.

From: Norbert Buchmuller <[email protected]>

The 'wrandom' multipath algo is recognised when adding the route, but not resolved when it is printed (prints 'unknown'):

ianus:~# ip ro add 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2
ianus:~# ip ro get to 1.2.3.4
1.2.3.4 mpath unknown dev ppp0  src 62.77.192.67
    cache  mtu 1492 advmss 1452 hoplimit 64
ianus:~# ip ro del 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2

See http://bugs.debian.org/428440 for more information.

---
 ip/iproute.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
ip/iproute.c +1 -1
index d3a3243..3b5c4b1 100644
@@ -365,7 +365,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 		__u32 mp_alg = *(__u32*) RTA_DATA(tb[RTA_MP_ALGO]);
 		if (mp_alg > IP_MP_ALG_NONE) {
 			fprintf(fp, "mpath %s ",
-			    mp_alg < IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
+			    mp_alg <= IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
 		}
 	}
 
Signature · 1 line
1.5.3.4
#10 lore raw

PATCH 11/12 Fix overflow in time2tick / tick2time.

The helper functions gets passed an unsigned int, which gets cast to long and overflows. See http://bugs.debian.org/175462

---
 tc/tc_core.c |    4 ++--
 tc/tc_core.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
tc/tc_core.c +2 -2
index 58155fb..fb89876 100644
@@ -35,12 +35,12 @@ int tc_core_time2big(long time)
 }
 
 
-long tc_core_time2tick(long time)
+unsigned tc_core_time2tick(unsigned time)
 {
 	return time*tick_in_usec;
 }
 
-long tc_core_tick2time(long tick)
+unsigned tc_core_tick2time(unsigned tick)
 {
 	return tick/tick_in_usec;
 }
tc/tc_core.h +2 -2
index a139da6..b2a16bc 100644
@@ -7,8 +7,8 @@
 #define TIME_UNITS_PER_SEC	1000000
 
 int  tc_core_time2big(long time);
-long tc_core_time2tick(long time);
-long tc_core_tick2time(long tick);
+unsigned tc_core_time2tick(unsigned time);
+unsigned tc_core_tick2time(unsigned tick);
 long tc_core_time2ktime(long time);
 long tc_core_ktime2time(long ktime);
 unsigned tc_calc_xmittime(unsigned rate, unsigned size);
Signature · 1 line
1.5.3.4
#11 lore raw

PATCH 12/12 Drop bogus reference to tc-filters and add lartc.org link to manpage.

From: Alexander Wirt <[email protected]>

---
 man/man8/ip.8 |    2 ++
 man/man8/tc.8 |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
man/man8/ip.8 +2 -0
index 153123a..8fd6d52 100644
@@ -1830,6 +1830,8 @@ was written by Alexey N. Kuznetsov and added in Linux 2.2.
 .RB "IP Command reference " ip-cref.ps
 .br
 .RB "IP tunnels " ip-cref.ps
+.br
+.RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <[email protected]>
 
 .SH AUTHOR
 Original Manpage  by Michail Litvak <[email protected]>
man/man8/tc.8 +2 -1
index 6acd572..53a866f 100644
@@ -339,7 +339,8 @@ was written by Alexey N. Kuznetsov and added in Linux 2.2.
 .BR tc-pfifo (8),
 .BR tc-bfifo (8),
 .BR tc-pfifo_fast (8),
-.BR tc-filters (8)
+.br
+.RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <[email protected]>
 
 .SH AUTHOR
 Manpage maintained by bert hubert ([email protected])
Signature · 1 line
1.5.3.4
#12 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

Applied 1,2,5,6,7,8,9,11,12 and provided alternative patch for 3.

Signature · 1 line
Stephen Hemminger <[email protected]>
#13 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

Quoted 3 lines · Stephen Hemminger

Applied 1,2,5,6,7,8,9,11,12 and provided alternative patch for 3.

Any reason for not using the patch I sent in reply to patch 3? Your alternative doesn't cover the ioctl patch and doesn't include the other bugfix from my patch ..

#14 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

In reply to Stephen Hemminger
Quoted 3 lines · Stephen Hemminger

Applied 1,2,5,6,7,8,9,11,12 and provided alternative patch for 3.

Did I miss something, am I to cross-eyed to see they are there, or did you miss to apply some of the patches?

This is my comparison of the submissions I made against what shows up at
http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=shortlog

1 - MISSING (fixes multiple typos, From: Alexander Wirt)
2 - MISSING (add ro src and ru prio param to help text, From: Alexander Wirt) 3 - dropped (alternative patch used)
4 - dropped (netbug script removed)
5 - MISSING (o_key vs i_key, From: Herbert Xu)
6 - applied and REVERTED (Remove reference to tc-filters, From: Andreas Barth) 7 - MISSING (tc -batch broken lines and comments fix, From: Andreas Henriksson) 8 - applied
9 - applied
10 - dropped (broken mpath support removed)
11 - applied
12 - applied

... and the 2 additional patches where applied.

The ones I have doubt about are: 1, 2, 5, 6, 7.
Could you please double-check and tell me what happened to them?

Signature · 2 lines
Regards,
Andreas Henriksson
#15 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

Quoted 26 lines · On Wed, 17 Oct 2007 18:50:50 +0200 Andreas Henriksson <[email protected]> wrote:
Quoted 3 lines · Stephen Hemminger

Applied 1,2,5,6,7,8,9,11,12 and provided alternative patch for 3.

Did I miss something, am I to cross-eyed to see they are there, or did you miss to apply some of the patches?

This is my comparison of the submissions I made against what shows up at
http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=shortlog

1 - MISSING (fixes multiple typos, From: Alexander Wirt)
2 - MISSING (add ro src and ru prio param to help text, From: Alexander Wirt) 3 - dropped (alternative patch used)
4 - dropped (netbug script removed)
5 - MISSING (o_key vs i_key, From: Herbert Xu)
6 - applied and REVERTED (Remove reference to tc-filters, From: Andreas Barth) 7 - MISSING (tc -batch broken lines and comments fix, From: Andreas Henriksson) 8 - applied
9 - applied
10 - dropped (broken mpath support removed)
11 - applied
12 - applied

Quoted 6 lines

... and the 2 additional patches where applied.

The ones I have doubt about are: 1, 2, 5, 6, 7.
Could you please double-check and tell me what happened to them?

The missing ones are now applied to git, for next release which will either be a bug fix (if other problems show up) or wait until new features for 2.6.24 are included.

Signature · 1 line
Stephen Hemminger <[email protected]>
#16 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

Quoted 4 lines · Stephen Hemminger

The missing ones are now applied to git, for next release which will either be a bug fix (if other problems show up) or wait until new features for 2.6.24 are included.

Thank you!

We are currently working on importing the debian package to a git repository. This includes learning git and suitable workflows for using git with packages. Hopefully this will simplify sending patches upstream in the future. While doing this I've noticed that some parts needs to be split out in separate patches and that there are many more small things that needs to be reviewed and sent upstream. Expect more patches coming in the future (but don't hold your breath, it'll probably take a while to gather all the needed free time).

Additionally I noticed that the last few releases hasn't been tagged, or atleast the tags doesn't seem to be pushed out to the repo on kernel.org. It would be nice for us if they where available, so please put this on the wishlist. :)

I don't know if it's just me doing something wrong, but cloning from the url with the symlink to your personal repository doesn't seem to work:
git://git.kernel.org/pub/network/iproute2/iproute2.git
Using this url works though:
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
(These are the urls from a previous mail you sent me.... Just wanted to notify you in case something was broken with the symlink.)

Have a nice day.

Signature · 2 lines
Regards,
Andreas Henriksson
#17 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

Quoted 32 lines · On Wed, 17 Oct 2007 19:58:59 +0200 Andreas Henriksson <[email protected]> wrote:
Quoted 4 lines · Stephen Hemminger

The missing ones are now applied to git, for next release which will either be a bug fix (if other problems show up) or wait until new features for 2.6.24 are included.

Thank you!

We are currently working on importing the debian package to a git repository. This includes learning git and suitable workflows for using git with packages. Hopefully this will simplify sending patches upstream in the future. While doing this I've noticed that some parts needs to be split out in separate patches and that there are many more small things that needs to be reviewed and sent upstream. Expect more patches coming in the future (but don't hold your breath, it'll probably take a while to gather all the needed free time).

Additionally I noticed that the last few releases hasn't been tagged, or atleast the tags doesn't seem to be pushed out to the repo on kernel.org. It would be nice for us if they where available, so please put this on the wishlist. :)

I don't know if it's just me doing something wrong, but cloning from the url with the symlink to your personal repository doesn't seem to work:
git://git.kernel.org/pub/network/iproute2/iproute2.git
Using this url works though:
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
(These are the urls from a previous mail you sent me.... Just wanted to notify you in case something was broken with the symlink.)

Quoted 2 lines

Have a nice day.

The tagging naming convention is messed up, but they are there:

$ git tag -l
ss050607
ss-050808
ss-050816
ss-050901
ss-050929
ss-051006
ss-051007
ss-051101
ss-051107
ss-060110
ss-060314
ss-060323
v2_6_10-050124
v2_6_10-050207
v2_6_10-050209
v2_6_11-050310
v2_6_11-050314
v2_6_11-050318
v2_6_11-050330
v2.6.19-061214
v2.6.23-071016
v2_6_7-040701
v2_6_7-040702
v2_6_7-ss040608
v2_6_8-040730
v2_6_8-040813-jamal
v2_6_8-040823
v2_6_8-ss040831
v2_6_9-041019
v2_6_9-jamal
v2_6_9-ss040831
Signature · 1 line
Stephen Hemminger <[email protected]>
#18 lore raw

Re: [PATCH 12/12] Drop bogus reference to tc-filters and add lartc.org link to manpage.

Quoted 4 lines · Stephen Hemminger

The tagging naming convention is messed up, but they are there:

$ git tag -l

I don't want to be a pain in the ass, but....

this is the list from my clone of
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git

ss-050808
ss-050816
ss-050901
ss-050929
ss-051006
ss-051007
ss-051101
ss-051107
ss-060110
ss-060314
ss-060323
ss050607
v2.6.19-061214
v2_6_10-050124
v2_6_10-050207
v2_6_10-050209
v2_6_11-050310
v2_6_11-050314
v2_6_11-050318
v2_6_11-050330
v2_6_7-040701
v2_6_7-040702
v2_6_7-ss040608
v2_6_8-040730
v2_6_8-040813-jamal
v2_6_8-040823
v2_6_8-ss040831
v2_6_9-041019
v2_6_9-jamal
v2_6_9-ss040831

None of the tags are from (20)07....

And none of the tags at the gitweb have a tag from this year eigther.
http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=tags

Any chance you forgot to push the tags out to the public repo? (Which you seem to have to do explicitly in git.)

--
Regards,
Andreas Henriksson

#19 lore raw

Re: [PATCH 10/12] Fix off-by-one in print of wrandom algo.

In reply to Andreas Henriksson
Quoted 23 lines · On Fri, 12 Oct 2007 10:56:45 +0200 Andreas Henriksson <[email protected]> wrote:

From: Norbert Buchmuller <[email protected]>

The 'wrandom' multipath algo is recognised when adding the route, but not resolved when it is printed (prints 'unknown'):

ianus:~# ip ro add 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2
ianus:~# ip ro get to 1.2.3.4
1.2.3.4 mpath unknown dev ppp0  src 62.77.192.67
    cache  mtu 1492 advmss 1452 hoplimit 64
ianus:~# ip ro del 1.2.3.4 mpath wrandom nexthop dev ppp0 weight 1 nexthop dev ppp1 weight 2

See http://bugs.debian.org/428440 for more information.

---
 ip/iproute.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
ip/iproute.c +0 -0
index d3a3243..3b5c4b1 100644

ip/iproute.c int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) · line 371

Quoted 8 lines
ip/iproute.c +1 -1
@@ -365,7 +365,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 		__u32 mp_alg = *(__u32*) RTA_DATA(tb[RTA_MP_ALGO]);
 		if (mp_alg > IP_MP_ALG_NONE) {
 			fprintf(fp, "mpath %s ",
-			    mp_alg < IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
+			    mp_alg <= IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
 		}
 	}
 

Actually since multi-path was removed from kernel, I just pulled support for it from current iproute

Signature · 1 line
Stephen Hemminger <[email protected]>
#20 lore raw

Re: [PATCH 04/12] Fix up various problems in netbug script.

In reply to Andreas Henriksson
Quoted 10 lines · On Fri, 12 Oct 2007 10:56:39 +0200 Andreas Henriksson <[email protected]> wrote:

From: Javier Fernández-Sanguino Peña <[email protected]>

Fix race conditions and temporary file symlink attacks. See http://bugs.debian.org/289541

Additional improvements by Allard Hoeve <[email protected]> and others. See http://bugs.debian.org/313540, http://bugs.debian.org/313541,
and http://bugs.debian.org/313544.

Does anyone ever use this script? Maybe it should just be pulled?

#21 lore raw

Re: [PATCH 04/12] Fix up various problems in netbug script.

Quoted 1 line · Stephen Hemminger

Does anyone ever use this script? Maybe it should just be pulled?

Looks like something more closely related to reporting bugs directly to you upstream guys rather then any distribution would use, so if you don't have a need for it then feel free to remove it.

Signature · 2 lines
Regards,
Andreas Henriksson
#22 lore raw

Re: [PATCH 03/12] Prevent renaming interfaces to empty string.

In reply to Andreas Henriksson
Quoted 13 lines · Andreas Henriksson

From: Alexander Wirt <[email protected]>

---
 ip/iplink.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
ip/iplink.c +0 -0
index 4060845..da1f64e 100644

ip/iplink.c static int do_set(int argc, char **argv) · line 676

Quoted 7 lines
ip/iplink.c +4 -0
@@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
 	}
 
 	if (newname && strcmp(dev, newname)) {
+		if (strlen(newname) == 0) {
+		    printf("\"\" is not valid device identifier\n");
+		    return -1;
+		}

Indentation fixed, same change for the non-ioctl case, use invarg. While I'm at it I also fixed the error message for "name too long", *argv is NULL at this point.

ip/iplink.c +5 -1
index 4060845..8e0ed2a 100644
@@ -336,8 +336,10 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
 
 	if (name) {
 		len = strlen(name) + 1;
+		if (len == 1)
+			invarg("\"\" is not a valid device identifier\n", "name");
 		if (len > IFNAMSIZ)
-			invarg("\"name\" too long\n", *argv);
+			invarg("\"name\" too long\n", name);
 		addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name, len);
 	}
 
@@ -670,6 +672,8 @@ static int do_set(int argc, char **argv)
 	}
 
 	if (newname && strcmp(dev, newname)) {
+		if (strlen(newname) == 0)
+			invarg("\"\" is not a valid device identifier\n", "name");
 		if (do_changename(dev, newname) < 0)
 			return -1;
 		dev = newname;
#23 lore raw

Re: [PATCH 03/12] Prevent renaming interfaces to empty string.

In reply to Andreas Henriksson
Quoted 13 lines · On Fri, 12 Oct 2007 10:56:38 +0200 Andreas Henriksson <[email protected]> wrote:

From: Alexander Wirt <[email protected]>

---
 ip/iplink.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
ip/iplink.c +0 -0
index 4060845..da1f64e 100644

ip/iplink.c static int do_set(int argc, char **argv) · line 679

Quoted 10 lines
ip/iplink.c +4 -0
@@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
 	}
 
 	if (newname && strcmp(dev, newname)) {
+		if (strlen(newname) == 0) {
+		    printf("\"\" is not valid device identifier\n");
+		    return -1;
+		}
 		if (do_changename(dev, newname) < 0)
 			return -1;
 		dev = newname;

The kernel should already be preventing this?

Signature · 1 line
Stephen Hemminger <[email protected]>
#24 lore raw

Re: [PATCH 03/12] Prevent renaming interfaces to empty string.

Quoted 10 lines · Stephen Hemminger

ip/iplink.c static int do_set(int argc, char **argv) · line 679

Quoted 8 lines
ip/iplink.c +4 -0
 	if (newname && strcmp(dev, newname)) {
+		if (strlen(newname) == 0) {
+		    printf("\"\" is not valid device identifier\n");
+		    return -1;
+		}
 		if (do_changename(dev, newname) < 0)
 			return -1;
 		dev = newname;

The kernel should already be preventing this?

Looks like something prevents the interface to end up with no name, but there's no error message...

./ip/ip is the "vanilla" and /sbin/ip is debians version.

$ sudo ./ip/ip link set skif name ""
$ echo $?
0
$ sudo /sbin/ip link set skif name ""
"" is not valid device identifier
$ echo $?
255

Reporting the error is probably the preferred behaviour (and return code set to error is most likely helpful for scripts).

Signature · 2 lines
Regards,
Andreas Henriksson