diff options
author | Robert Olsson <robert.olsson@its.uu.se> | 2008-08-06 03:45:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-06 03:45:05 +0200 |
commit | ff2a79a5a934fe0dbb136ffad61f79b5c6385614 (patch) | |
tree | 99a75b0d03143e95f0a26ac4e9590e3b94585b0f /net/core | |
parent | pktgen: random flow (diff) | |
download | linux-ff2a79a5a934fe0dbb136ffad61f79b5c6385614.tar.xz linux-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/core')
-rw-r--r-- | net/core/pktgen.c | 4 |
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; } |