Commit 668dfab2 authored by Stephen Hemminger's avatar Stephen Hemminger

Merge branch 'master' into net-next

parents 242a9f73 4c7d75de
...@@ -98,6 +98,7 @@ struct can_ctrlmode { ...@@ -98,6 +98,7 @@ struct can_ctrlmode {
#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ #define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */ #define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */
#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */ #define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
/* /*
* CAN device statistics * CAN device statistics
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <sched.h> #include <sched.h>
#include <sys/mount.h> #include <sys/mount.h>
#include <sys/syscall.h>
#include <errno.h> #include <errno.h>
#define NETNS_RUN_DIR "/var/run/netns" #define NETNS_RUN_DIR "/var/run/netns"
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
#endif #endif
#ifndef HAVE_SETNS #ifndef HAVE_SETNS
static int setns(int fd, int nstype) static inline int setns(int fd, int nstype)
{ {
#ifdef __NR_setns #ifdef __NR_setns
return syscall(__NR_setns, fd, nstype); return syscall(__NR_setns, fd, nstype);
......
...@@ -157,14 +157,19 @@ static int ipneigh_modify(int cmd, int flags, int argc, char **argv) ...@@ -157,14 +157,19 @@ static int ipneigh_modify(int cmd, int flags, int argc, char **argv)
exit(-1); exit(-1);
} }
req.ndm.ndm_family = dst.family; req.ndm.ndm_family = dst.family;
addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen); if (addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen) < 0)
return -1;
if (lla && strcmp(lla, "null")) { if (lla && strcmp(lla, "null")) {
char llabuf[20]; char llabuf[20];
int l; int l;
l = ll_addr_a2n(llabuf, sizeof(llabuf), lla); l = ll_addr_a2n(llabuf, sizeof(llabuf), lla);
addattr_l(&req.n, sizeof(req), NDA_LLADDR, llabuf, l); if (l < 0)
return -1;
if (addattr_l(&req.n, sizeof(req), NDA_LLADDR, llabuf, l) < 0)
return -1;
} }
ll_init_map(&rth); ll_init_map(&rth);
......
...@@ -221,13 +221,13 @@ Link types: ...@@ -221,13 +221,13 @@ Link types:
- Virtual tunnel interface GRE over IPv4 - Virtual tunnel interface GRE over IPv4
.sp .sp
.BR gretap .BR gretap
- Virtual L2 tuunel interface GRE over IPv4 - Virtual L2 tunnel interface GRE over IPv4
.sp .sp
.BR ip6gre .BR ip6gre
- Virtual tuunel interface GRE over IPv6 - Virtual tunnel interface GRE over IPv6
.sp .sp
.BR ip6gretap .BR ip6gretap
- Virtual L2 tuunel interface GRE over IPv6 - Virtual L2 tunnel interface GRE over IPv6
.in -8 .in -8
.TP .TP
......
This diff is collapsed.
...@@ -31,12 +31,13 @@ listtests: ...@@ -31,12 +31,13 @@ listtests:
alltests: $(TESTS) alltests: $(TESTS)
clean: clean:
@echo "Removing $(RESULTS_DIR) dir ..."
@rm -rf $(RESULTS_DIR) @rm -rf $(RESULTS_DIR)
distclean: clean distclean: clean
echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..; echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..;
$(TESTS): $(TESTS): clean
@mkdir -p $(RESULTS_DIR) @mkdir -p $(RESULTS_DIR)
@for d in $(TESTS_DIR); do \ @for d in $(TESTS_DIR); do \
......
...@@ -62,8 +62,9 @@ ts_ip() ...@@ -62,8 +62,9 @@ ts_ip()
TMP_OUT=`mktemp /tmp/tc_testsuite.XXXXXX` || exit TMP_OUT=`mktemp /tmp/tc_testsuite.XXXXXX` || exit
$IP $@ 2> $TMP_ERR > $TMP_OUT $IP $@ 2> $TMP_ERR > $TMP_OUT
RET=$?
if [ -s $TMP_ERR ]; then if [ -s $TMP_ERR ] || [ "$RET" != "0" ]; then
ts_err "${SCRIPT}: ${DESC} failed:" ts_err "${SCRIPT}: ${DESC} failed:"
ts_err "command: $IP $@" ts_err "command: $IP $@"
ts_err "stderr output:" ts_err "stderr output:"
...@@ -91,3 +92,8 @@ ts_qdisc_available() ...@@ -91,3 +92,8 @@ ts_qdisc_available()
return 1; return 1;
fi fi
} }
rand_dev()
{
echo "dev-$(tr -dc "[:alpha:]" < /dev/urandom | head -c 6)"
}
#!/bin/sh
source lib/generic.sh
ts_log "[Testing add/del virtual links]"
NEW_DEV="$(rand_dev)"
ts_ip "$0" "Add $NEW_DEV dummy interface" link add dev $NEW_DEV type dummy
ts_ip "$0" "Show $NEW_DEV dummy interface" link show dev $NEW_DEV
ts_ip "$0" "Del $NEW_DEV dummy interface" link del dev $NEW_DEV
#!/bin/sh
source lib/generic.sh
NL_FILE="tests/ip/link/dev_wo_vf_rate.nl"
ts_ip "$0" "Show VF devices w/o VF rate info" -d monitor file $NL_FILE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment