diff options
author | Robert Olsson <robert.olsson@its.uu.se> | 2008-08-05 21:45:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-05 21:45:05 -0400 |
commit | ff2a79a5a934fe0dbb136ffad61f79b5c6385614 (patch) | |
tree | 99a75b0d03143e95f0a26ac4e9590e3b94585b0f /net/core/pktgen.c | |
parent | 1211a64554065316e02b3c62b320088ad4f63260 (diff) |
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/pktgen.c')
-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) | |||
2166 | mc = random32() % pkt_dev->src_mac_count; | 2166 | mc = random32() % pkt_dev->src_mac_count; |
2167 | else { | 2167 | else { |
2168 | mc = pkt_dev->cur_src_mac_offset++; | 2168 | mc = pkt_dev->cur_src_mac_offset++; |
2169 | if (pkt_dev->cur_src_mac_offset > | 2169 | if (pkt_dev->cur_src_mac_offset >= |
2170 | pkt_dev->src_mac_count) | 2170 | pkt_dev->src_mac_count) |
2171 | pkt_dev->cur_src_mac_offset = 0; | 2171 | pkt_dev->cur_src_mac_offset = 0; |
2172 | } | 2172 | } |
@@ -2193,7 +2193,7 @@ static void mod_cur_headers(struct pktgen_dev *pkt_dev) | |||
2193 | 2193 | ||
2194 | else { | 2194 | else { |
2195 | mc = pkt_dev->cur_dst_mac_offset++; | 2195 | mc = pkt_dev->cur_dst_mac_offset++; |
2196 | if (pkt_dev->cur_dst_mac_offset > | 2196 | if (pkt_dev->cur_dst_mac_offset >= |
2197 | pkt_dev->dst_mac_count) { | 2197 | pkt_dev->dst_mac_count) { |
2198 | pkt_dev->cur_dst_mac_offset = 0; | 2198 | pkt_dev->cur_dst_mac_offset = 0; |
2199 | } | 2199 | } |