File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -711,10 +711,18 @@ void *thread_hdl(void *temp)
711711**/
712712void seq_send (const char * interface , sequence_t seq , u16 seq_cnt2 , cmd_line_t cmd )
713713{
714- // First, let's check if the destination IP is set.
714+ // First, make sure interface isn't NULL.
715+ if (interface == NULL )
716+ {
717+ fprintf (stderr , "Interface not set on sequence #%d. Not moving forward with this sequence.\n" , seq_cnt2 );
718+
719+ return ;
720+ }
721+
722+ // Let's check if the destination IP is set.
715723 if (seq .ip .dst_ip == NULL )
716724 {
717- fprintf (stdout , "Destination IP not set on sequence #%u . Not moving forward with this sequence.\n" , seq_cnt2 );
725+ fprintf (stderr , "Destination IP not set on sequence #%d . Not moving forward with this sequence.\n" , seq_cnt2 );
718726
719727 return ;
720728 }
You can’t perform that action at this time.
0 commit comments