Lines Matching refs:new
913 struct ipv6_opt_hdr *new; in calipso_opt_insert() local
928 new = kzalloc(buf_len, GFP_ATOMIC); in calipso_opt_insert()
929 if (!new) in calipso_opt_insert()
933 memcpy(new, hop, start); in calipso_opt_insert()
934 ret_val = calipso_genopt((unsigned char *)new, start, buf_len, doi_def, in calipso_opt_insert()
937 kfree(new); in calipso_opt_insert()
944 calipso_pad_write((unsigned char *)new, buf_len, pad); in calipso_opt_insert()
948 memcpy((char *)new + buf_len, (char *)hop + end, hop_len - end); in calipso_opt_insert()
951 new->nexthdr = 0; in calipso_opt_insert()
952 new->hdrlen = buf_len / 8 - 1; in calipso_opt_insert()
954 return new; in calipso_opt_insert()
972 struct ipv6_opt_hdr **new) in calipso_opt_del() argument
984 *new = NULL; in calipso_opt_del()
989 *new = kzalloc(hop_len - delta, GFP_ATOMIC); in calipso_opt_del()
990 if (!*new) in calipso_opt_del()
993 memcpy(*new, hop, start); in calipso_opt_del()
994 (*new)->hdrlen -= delta / 8; in calipso_opt_del()
996 calipso_pad_write((unsigned char *)*new, start, pad); in calipso_opt_del()
998 memcpy((char *)*new + start + pad, (char *)hop + end, in calipso_opt_del()
1130 struct ipv6_opt_hdr *old, *new; in calipso_sock_setattr() local
1137 new = calipso_opt_insert(old, doi_def, secattr); in calipso_sock_setattr()
1139 if (IS_ERR(new)) in calipso_sock_setattr()
1140 return PTR_ERR(new); in calipso_sock_setattr()
1142 ret_val = calipso_opt_update(sk, new); in calipso_sock_setattr()
1144 kfree(new); in calipso_sock_setattr()
1195 struct ipv6_opt_hdr *old, *new; in calipso_req_setattr() local
1203 new = calipso_opt_insert(old, doi_def, secattr); in calipso_req_setattr()
1204 if (IS_ERR(new)) in calipso_req_setattr()
1205 return PTR_ERR(new); in calipso_req_setattr()
1207 txopts = ipv6_renew_options(sk, req_inet->ipv6_opt, IPV6_HOPOPTS, new); in calipso_req_setattr()
1209 kfree(new); in calipso_req_setattr()
1234 struct ipv6_opt_hdr *new; in calipso_req_delattr() local
1241 if (calipso_opt_del(req_inet->ipv6_opt->hopopt, &new)) in calipso_req_delattr()
1244 txopts = ipv6_renew_options(sk, req_inet->ipv6_opt, IPV6_HOPOPTS, new); in calipso_req_delattr()
1253 kfree(new); in calipso_req_delattr()