|
|
| version 1.9, 2004/03/08 07:43:44 | version 1.10, 2004/04/22 04:22:01 |
|---|---|
| Line 1041 add_mfc(struct mfcctl2 *mfccp) | Line 1041 add_mfc(struct mfcctl2 *mfccp) |
| } | } |
| } | } |
| if (rt == NULL) { /* no upcall, so make a new entry */ | if (rt == NULL) { /* no upcall, so make a new entry */ |
| rt = (struct mfc *)malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT); | rt = malloc(sizeof(*rt), M_MRTABLE, M_INTWAIT | M_NULLOK); |
| if (rt == NULL) { | if (rt == NULL) { |
| splx(s); | splx(s); |
| return ENOBUFS; | return ENOBUFS; |
| } | } |
| init_mfc_params(rt, mfccp); | init_mfc_params(rt, mfccp); |
| Line 1238 X_ip_mforward(struct ip *ip, struct ifne | Line 1238 X_ip_mforward(struct ip *ip, struct ifne |
| * just going to fail anyway. Make sure to pullup the header so | * just going to fail anyway. Make sure to pullup the header so |
| * that other people can't step on it. | * that other people can't step on it. |
| */ | */ |
| rte = (struct rtdetq *)malloc((sizeof *rte), M_MRTABLE, M_NOWAIT); | rte = malloc((sizeof *rte), M_MRTABLE, M_INTWAIT | M_NULLOK); |
| if (rte == NULL) { | if (rte == NULL) { |
| splx(s); | splx(s); |
| return ENOBUFS; | return ENOBUFS; |
| } | } |
| mb0 = m_copypacket(m, M_DONTWAIT); | mb0 = m_copypacket(m, M_DONTWAIT); |
| if (mb0 && (M_HASCL(mb0) || mb0->m_len < hlen)) | if (mb0 && (M_HASCL(mb0) || mb0->m_len < hlen)) |
| mb0 = m_pullup(mb0, hlen); | mb0 = m_pullup(mb0, hlen); |
| Line 1277 X_ip_mforward(struct ip *ip, struct ifne | Line 1278 X_ip_mforward(struct ip *ip, struct ifne |
| goto non_fatal; | goto non_fatal; |
| /* no upcall, so make a new entry */ | /* no upcall, so make a new entry */ |
| rt = (struct mfc *)malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT); | rt = malloc(sizeof(*rt), M_MRTABLE, M_INTWAIT | M_NULLOK); |
| if (rt == NULL) | if (rt == NULL) |
| goto fail; | goto fail; |
| /* Make a copy of the header to send to the user level process */ | /* Make a copy of the header to send to the user level process */ |
| mm = m_copy(mb0, 0, hlen); | mm = m_copy(mb0, 0, hlen); |
| if (mm == NULL) | if (mm == NULL) |
| Line 2253 add_bw_upcall(struct bw_upcall *req) | Line 2255 add_bw_upcall(struct bw_upcall *req) |
| splx(s); | splx(s); |
| /* Allocate the new bw_meter entry */ | /* Allocate the new bw_meter entry */ |
| x = (struct bw_meter *)malloc(sizeof(*x), M_BWMETER, M_NOWAIT); | x = malloc(sizeof(*x), M_BWMETER, M_INTWAIT); |
| if (x == NULL) | |
| return ENOBUFS; | |
| /* Set the new bw_meter entry */ | /* Set the new bw_meter entry */ |
| x->bm_threshold.b_time = req->bu_threshold.b_time; | x->bm_threshold.b_time = req->bu_threshold.b_time; |