|
|
| version 1.12, 2004/03/01 17:27:17 | version 1.13, 2004/04/22 04:22:06 |
|---|---|
| Line 2242 sppp_lcp_RCR(struct sppp *sp, struct lcp | Line 2242 sppp_lcp_RCR(struct sppp *sp, struct lcp |
| len -= 4; | len -= 4; |
| origlen = len; | origlen = len; |
| buf = r = malloc (len, M_TEMP, M_NOWAIT); | buf = r = malloc (len, M_TEMP, M_INTWAIT); |
| if (! buf) | |
| return (0); | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "lcp parse opts: ", | log(LOG_DEBUG, SPP_FMT "lcp parse opts: ", |
| Line 2463 sppp_lcp_RCN_rej(struct sppp *sp, struct | Line 2461 sppp_lcp_RCN_rej(struct sppp *sp, struct |
| u_char *buf, *p; | u_char *buf, *p; |
| len -= 4; | len -= 4; |
| buf = malloc (len, M_TEMP, M_NOWAIT); | buf = malloc (len, M_TEMP, M_INTWAIT); |
| if (!buf) | |
| return; | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "lcp rej opts: ", | log(LOG_DEBUG, SPP_FMT "lcp rej opts: ", |
| Line 2527 sppp_lcp_RCN_nak(struct sppp *sp, struct | Line 2523 sppp_lcp_RCN_nak(struct sppp *sp, struct |
| u_long magic; | u_long magic; |
| len -= 4; | len -= 4; |
| buf = malloc (len, M_TEMP, M_NOWAIT); | buf = malloc (len, M_TEMP, M_INTWAIT); |
| if (!buf) | |
| return; | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "lcp nak opts: ", | log(LOG_DEBUG, SPP_FMT "lcp nak opts: ", |
| Line 2919 sppp_ipcp_RCR(struct sppp *sp, struct lc | Line 2913 sppp_ipcp_RCR(struct sppp *sp, struct lc |
| * Make sure to allocate a buf that can at least hold a | * Make sure to allocate a buf that can at least hold a |
| * conf-nak with an `address' option. We might need it below. | * conf-nak with an `address' option. We might need it below. |
| */ | */ |
| buf = r = malloc ((len < 6? 6: len), M_TEMP, M_NOWAIT); | buf = r = malloc ((len < 6? 6: len), M_TEMP, M_INTWAIT); |
| if (! buf) | |
| return (0); | |
| /* pass 1: see if we can recognize them */ | /* pass 1: see if we can recognize them */ |
| if (debug) | if (debug) |
| Line 3117 sppp_ipcp_RCN_rej(struct sppp *sp, struc | Line 3109 sppp_ipcp_RCN_rej(struct sppp *sp, struc |
| int debug = ifp->if_flags & IFF_DEBUG; | int debug = ifp->if_flags & IFF_DEBUG; |
| len -= 4; | len -= 4; |
| buf = malloc (len, M_TEMP, M_NOWAIT); | buf = malloc (len, M_TEMP, M_INTWAIT); |
| if (!buf) | |
| return; | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "ipcp rej opts: ", | log(LOG_DEBUG, SPP_FMT "ipcp rej opts: ", |
| Line 3163 sppp_ipcp_RCN_nak(struct sppp *sp, struc | Line 3153 sppp_ipcp_RCN_nak(struct sppp *sp, struc |
| u_long wantaddr; | u_long wantaddr; |
| len -= 4; | len -= 4; |
| buf = malloc (len, M_TEMP, M_NOWAIT); | buf = malloc (len, M_TEMP, M_INTWAIT); |
| if (!buf) | |
| return; | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "ipcp nak opts: ", | log(LOG_DEBUG, SPP_FMT "ipcp nak opts: ", |
| Line 3392 sppp_ipv6cp_RCR(struct sppp *sp, struct | Line 3380 sppp_ipv6cp_RCR(struct sppp *sp, struct |
| * Make sure to allocate a buf that can at least hold a | * Make sure to allocate a buf that can at least hold a |
| * conf-nak with an `address' option. We might need it below. | * conf-nak with an `address' option. We might need it below. |
| */ | */ |
| buf = r = malloc ((len < 6? 6: len), M_TEMP, M_NOWAIT); | buf = r = malloc ((len < 6? 6: len), M_TEMP, M_INTWAIT); |
| if (! buf) | |
| return (0); | |
| /* pass 1: see if we can recognize them */ | /* pass 1: see if we can recognize them */ |
| if (debug) | if (debug) |
| Line 3542 sppp_ipv6cp_RCN_rej(struct sppp *sp, str | Line 3528 sppp_ipv6cp_RCN_rej(struct sppp *sp, str |
| int debug = ifp->if_flags & IFF_DEBUG; | int debug = ifp->if_flags & IFF_DEBUG; |
| len -= 4; | len -= 4; |
| buf = malloc (len, M_TEMP, M_NOWAIT); | buf = malloc (len, M_TEMP, M_INTWAIT); |
| if (!buf) | |
| return; | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "ipv6cp rej opts:", | log(LOG_DEBUG, SPP_FMT "ipv6cp rej opts:", |
| Line 3588 sppp_ipv6cp_RCN_nak(struct sppp *sp, str | Line 3572 sppp_ipv6cp_RCN_nak(struct sppp *sp, str |
| struct in6_addr suggestaddr; | struct in6_addr suggestaddr; |
| len -= 4; | len -= 4; |
| buf = malloc (len, M_TEMP, M_NOWAIT); | buf = malloc (len, M_TEMP, M_INTWAIT); |
| if (!buf) | |
| return; | |
| if (debug) | if (debug) |
| log(LOG_DEBUG, SPP_FMT "ipv6cp nak opts:", | log(LOG_DEBUG, SPP_FMT "ipv6cp nak opts:", |
| Line 5021 sppp_params(struct sppp *sp, u_long cmd, | Line 5003 sppp_params(struct sppp *sp, u_long cmd, |
| struct spppreq *spr; | struct spppreq *spr; |
| int rv = 0; | int rv = 0; |
| if ((spr = malloc(sizeof(struct spppreq), M_TEMP, M_NOWAIT)) == 0) | spr = malloc(sizeof(struct spppreq), M_TEMP, M_INTWAIT); |
| return (EAGAIN); | |
| /* | /* |
| * ifr->ifr_data is supposed to point to a struct spppreq. | * ifr->ifr_data is supposed to point to a struct spppreq. |
| * Check the cmd word first before attempting to fetch all the | * Check the cmd word first before attempting to fetch all the |