|
Lines 671-677
Link Here
|
| 671 |
* a valid TCP sequence number for the session. |
671 |
* a valid TCP sequence number for the session. |
| 672 |
*/ |
672 |
*/ |
| 673 |
void |
673 |
void |
| 674 |
in_pcbnotify(head, dst, fport_arg, laddr, lport_arg, cmd, notify, tcp_sequence, tcp_seq_check) |
674 |
in_pcbnotify(head, dst, fport_arg, laddr, lport_arg, cmd, notify, tcp_sequence, |
|
|
675 |
tcp_seq_check, wild_match) |
| 675 |
struct inpcbhead *head; |
676 |
struct inpcbhead *head; |
| 676 |
struct sockaddr *dst; |
677 |
struct sockaddr *dst; |
| 677 |
u_int fport_arg, lport_arg; |
678 |
u_int fport_arg, lport_arg; |
|
Lines 680-685
Link Here
|
| 680 |
void (*notify) __P((struct inpcb *, int)); |
681 |
void (*notify) __P((struct inpcb *, int)); |
| 681 |
u_int32_t tcp_sequence; |
682 |
u_int32_t tcp_sequence; |
| 682 |
int tcp_seq_check; |
683 |
int tcp_seq_check; |
|
|
684 |
int wild_match; |
| 683 |
{ |
685 |
{ |
| 684 |
register struct inpcb *inp, *oinp; |
686 |
register struct inpcb *inp, *oinp; |
| 685 |
struct in_addr faddr; |
687 |
struct in_addr faddr; |
|
Lines 700-708
Link Here
|
| 700 |
* deliver only to that socket. |
702 |
* deliver only to that socket. |
| 701 |
*/ |
703 |
*/ |
| 702 |
if (PRC_IS_REDIRECT(cmd) || cmd == PRC_HOSTDEAD) { |
704 |
if (PRC_IS_REDIRECT(cmd) || cmd == PRC_HOSTDEAD) { |
| 703 |
fport = 0; |
705 |
wild_match = IN_PCBNOTIFY_WILDCARD; |
| 704 |
lport = 0; |
|
|
| 705 |
laddr.s_addr = 0; |
| 706 |
if (cmd != PRC_HOSTDEAD) |
706 |
if (cmd != PRC_HOSTDEAD) |
| 707 |
notify = in_rtchange; |
707 |
notify = in_rtchange; |
| 708 |
} |
708 |
} |
|
Lines 715-725
Link Here
|
| 715 |
continue; |
715 |
continue; |
| 716 |
} |
716 |
} |
| 717 |
#endif |
717 |
#endif |
| 718 |
if (inp->inp_faddr.s_addr != faddr.s_addr || |
718 |
if (inp->inp_faddr.s_addr != faddr.s_addr || inp->inp_socket == 0 || |
| 719 |
inp->inp_socket == 0 || |
719 |
(wild_match == IN_PCBNOTIFY_NOT_WILDCARD && |
| 720 |
(lport && inp->inp_lport != lport) || |
720 |
(inp->inp_lport != lport || inp->inp_laddr.s_addr != laddr.s_addr || |
| 721 |
(laddr.s_addr && inp->inp_laddr.s_addr != laddr.s_addr) || |
721 |
inp->inp_fport != fport))) { |
| 722 |
(fport && inp->inp_fport != fport)) { |
|
|
| 723 |
inp = LIST_NEXT(inp, inp_list); |
722 |
inp = LIST_NEXT(inp, inp_list); |
| 724 |
continue; |
723 |
continue; |
| 725 |
} |
724 |
} |
|
Lines 733-739
Link Here
|
| 733 |
* and TCP port numbers. |
732 |
* and TCP port numbers. |
| 734 |
*/ |
733 |
*/ |
| 735 |
if ((tcp_seq_check == 1) && (tcp_seq_vs_sess(inp, tcp_sequence) == 0)) { |
734 |
if ((tcp_seq_check == 1) && (tcp_seq_vs_sess(inp, tcp_sequence) == 0)) { |
| 736 |
inp = LIST_NEXT(inp, inp_list); |
|
|
| 737 |
break; |
735 |
break; |
| 738 |
} |
736 |
} |
| 739 |
oinp = inp; |
737 |
oinp = inp; |