Page MenuHomeFreeBSD

D30318.diff
No OneTemporary

D30318.diff

diff --git a/sys/netpfil/ipfw/dn_aqm_codel.c b/sys/netpfil/ipfw/dn_aqm_codel.c
--- a/sys/netpfil/ipfw/dn_aqm_codel.c
+++ b/sys/netpfil/ipfw/dn_aqm_codel.c
@@ -256,10 +256,8 @@
if (mtag == NULL)
mtag = m_tag_alloc(MTAG_ABI_COMPAT, DN_AQM_MTAG_TS,
sizeof(aqm_time_t), M_NOWAIT);
- if (mtag == NULL) {
- m_freem(m);
+ if (mtag == NULL)
goto drop;
- }
*(aqm_time_t *)(mtag + 1) = AQM_UNOW;
m_tag_prepend(m, mtag);
diff --git a/sys/netpfil/ipfw/dn_aqm_pie.c b/sys/netpfil/ipfw/dn_aqm_pie.c
--- a/sys/netpfil/ipfw/dn_aqm_pie.c
+++ b/sys/netpfil/ipfw/dn_aqm_pie.c
@@ -542,11 +542,11 @@
mtag = m_tag_alloc(MTAG_ABI_COMPAT, DN_AQM_MTAG_TS,
sizeof(aqm_time_t), M_NOWAIT);
if (mtag == NULL) {
- m_freem(m);
t = DROP;
+ } else {
+ *(aqm_time_t *)(mtag + 1) = AQM_UNOW;
+ m_tag_prepend(m, mtag);
}
- *(aqm_time_t *)(mtag + 1) = AQM_UNOW;
- m_tag_prepend(m, mtag);
}
if (t != DROP) {
diff --git a/sys/netpfil/ipfw/dn_sched_fq_codel.c b/sys/netpfil/ipfw/dn_sched_fq_codel.c
--- a/sys/netpfil/ipfw/dn_sched_fq_codel.c
+++ b/sys/netpfil/ipfw/dn_sched_fq_codel.c
@@ -189,10 +189,8 @@
if (mtag == NULL)
mtag = m_tag_alloc(MTAG_ABI_COMPAT, DN_AQM_MTAG_TS, sizeof(aqm_time_t),
M_NOWAIT);
- if (mtag == NULL) {
- m_freem(m);
+ if (mtag == NULL)
goto drop;
- }
*(aqm_time_t *)(mtag + 1) = AQM_UNOW;
m_tag_prepend(m, mtag);
diff --git a/sys/netpfil/ipfw/dn_sched_fq_pie.c b/sys/netpfil/ipfw/dn_sched_fq_pie.c
--- a/sys/netpfil/ipfw/dn_sched_fq_pie.c
+++ b/sys/netpfil/ipfw/dn_sched_fq_pie.c
@@ -734,11 +734,11 @@
mtag = m_tag_alloc(MTAG_ABI_COMPAT, DN_AQM_MTAG_TS,
sizeof(aqm_time_t), M_NOWAIT);
if (mtag == NULL) {
- m_freem(m);
t = DROP;
+ } else {
+ *(aqm_time_t *)(mtag + 1) = AQM_UNOW;
+ m_tag_prepend(m, mtag);
}
- *(aqm_time_t *)(mtag + 1) = AQM_UNOW;
- m_tag_prepend(m, mtag);
}
if (t != DROP) {

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 12, 10:17 AM (12 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23602900
Default Alt Text
D30318.diff (1 KB)

Event Timeline