summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRobert Olsson <robert.olsson@its.uu.se>2008-08-05 18:45:05 -0700
committerDavid S. Miller <davem@davemloft.net>2008-08-05 18:45:05 -0700
commitff2a79a5a934fe0dbb136ffad61f79b5c6385614 (patch)
tree99a75b0d03143e95f0a26ac4e9590e3b94585b0f /net
parent1211a64554065316e02b3c62b320088ad4f63260 (diff)
downloadlwn-ff2a79a5a934fe0dbb136ffad61f79b5c6385614.tar.gz
lwn-ff2a79a5a934fe0dbb136ffad61f79b5c6385614.zip
pktgen: mac count
dst_mac_count and src_mac_count patch from Eneas Hunguana We have sent one mac address to much. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/pktgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 9c87320fdf3f..2498cdaf8cbe 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2166,7 +2166,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
mc = random32() % pkt_dev->src_mac_count;
else {
mc = pkt_dev->cur_src_mac_offset++;
- if (pkt_dev->cur_src_mac_offset >
+ if (pkt_dev->cur_src_mac_offset >=
pkt_dev->src_mac_count)
pkt_dev->cur_src_mac_offset = 0;
}
@@ -2193,7 +2193,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev)
else {
mc = pkt_dev->cur_dst_mac_offset++;
- if (pkt_dev->cur_dst_mac_offset >
+ if (pkt_dev->cur_dst_mac_offset >=
pkt_dev->dst_mac_count) {
pkt_dev->cur_dst_mac_offset = 0;
}