Finish r274315: remove union 'u' from struct pf_send_entry.
Suggested by: kib
This commit is contained in:
parent
9c9bde01d1
commit
5b07fc31cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274320
@ -139,16 +139,11 @@ struct pf_send_entry {
|
||||
PFSE_ICMP,
|
||||
PFSE_ICMP6,
|
||||
} pfse_type;
|
||||
union {
|
||||
struct {
|
||||
int type;
|
||||
int code;
|
||||
int mtu;
|
||||
} icmpopts;
|
||||
} u;
|
||||
#define pfse_icmp_type u.icmpopts.type
|
||||
#define pfse_icmp_code u.icmpopts.code
|
||||
#define pfse_icmp_mtu u.icmpopts.mtu
|
||||
struct {
|
||||
int type;
|
||||
int code;
|
||||
int mtu;
|
||||
} icmpopts;
|
||||
};
|
||||
|
||||
STAILQ_HEAD(pf_send_head, pf_send_entry);
|
||||
@ -1368,8 +1363,8 @@ pf_intr(void *v)
|
||||
ip_output(pfse->pfse_m, NULL, NULL, 0, NULL, NULL);
|
||||
break;
|
||||
case PFSE_ICMP:
|
||||
icmp_error(pfse->pfse_m, pfse->pfse_icmp_type,
|
||||
pfse->pfse_icmp_code, 0, pfse->pfse_icmp_mtu);
|
||||
icmp_error(pfse->pfse_m, pfse->icmpopts.type,
|
||||
pfse->icmpopts.code, 0, pfse->icmpopts.mtu);
|
||||
break;
|
||||
#endif /* INET */
|
||||
#ifdef INET6
|
||||
@ -1378,8 +1373,8 @@ pf_intr(void *v)
|
||||
NULL);
|
||||
break;
|
||||
case PFSE_ICMP6:
|
||||
icmp6_error(pfse->pfse_m, pfse->pfse_icmp_type,
|
||||
pfse->pfse_icmp_code, pfse->pfse_icmp_mtu);
|
||||
icmp6_error(pfse->pfse_m, pfse->icmpopts.type,
|
||||
pfse->icmpopts.code, pfse->icmpopts.mtu);
|
||||
break;
|
||||
#endif /* INET6 */
|
||||
default:
|
||||
@ -2411,8 +2406,8 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af,
|
||||
#endif /* INET6 */
|
||||
}
|
||||
pfse->pfse_m = m0;
|
||||
pfse->pfse_icmp_type = type;
|
||||
pfse->pfse_icmp_code = code;
|
||||
pfse->icmpopts.type = type;
|
||||
pfse->icmpopts.code = code;
|
||||
pf_send(pfse);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user