| .. | .. |
|---|
| 24 | 24 | err 1 "Bursting not supported for this mode" |
|---|
| 25 | 25 | fi |
|---|
| 26 | 26 | [ -z "$COUNT" ] && COUNT="10000000" # Zero means indefinitely |
|---|
| 27 | +if [ -n "$DEST_IP" ]; then |
|---|
| 28 | + validate_addr${IP6} $DEST_IP |
|---|
| 29 | + read -r DST_MIN DST_MAX <<< $(parse_addr${IP6} $DEST_IP) |
|---|
| 30 | +fi |
|---|
| 31 | +if [ -n "$DST_PORT" ]; then |
|---|
| 32 | + read -r UDP_DST_MIN UDP_DST_MAX <<< $(parse_ports $DST_PORT) |
|---|
| 33 | + validate_ports $UDP_DST_MIN $UDP_DST_MAX |
|---|
| 34 | +fi |
|---|
| 27 | 35 | |
|---|
| 28 | 36 | # Base Config |
|---|
| 29 | 37 | DELAY="0" # Zero means max speed |
|---|
| .. | .. |
|---|
| 50 | 58 | |
|---|
| 51 | 59 | # Destination |
|---|
| 52 | 60 | pg_set $dev "dst_mac $DST_MAC" |
|---|
| 53 | | - pg_set $dev "dst$IP6 $DEST_IP" |
|---|
| 61 | + pg_set $dev "dst${IP6}_min $DST_MIN" |
|---|
| 62 | + pg_set $dev "dst${IP6}_max $DST_MAX" |
|---|
| 63 | + |
|---|
| 64 | + if [ -n "$DST_PORT" ]; then |
|---|
| 65 | + # Single destination port or random port range |
|---|
| 66 | + pg_set $dev "flag UDPDST_RND" |
|---|
| 67 | + pg_set $dev "udp_dst_min $UDP_DST_MIN" |
|---|
| 68 | + pg_set $dev "udp_dst_max $UDP_DST_MAX" |
|---|
| 69 | + fi |
|---|
| 54 | 70 | |
|---|
| 55 | 71 | # Inject packet into TX qdisc egress path of stack |
|---|
| 56 | 72 | pg_set $dev "xmit_mode queue_xmit" |
|---|