/** * inet_csk_clone_lock - clone an inet socket, and lock its clone * @sk: the socket to clone * @req: request_sock * @priority: for allocation (%GFP_KERNEL, %GFP_ATOMIC, etc) * * Caller must unlock socket even in error path (bh_unlock_sock(newsk))...
Also, since the child socket is created with inet_csk_clone_lock(), we have to unlock it and drop an extra reference (->sk_refcount is initially set to 2 and inet_csk_reqsk_queue_add() drops only one ref). For TFO, we also need to revert the work done by tcp_try_...
skb->mark = sk->sk_mark; skb_dst_set(skb, dst_clone(&rt->dst)); IP6_UPD_PO_STATS(net, rt->rt6i_idev, IPSTATS_MIB_OUT, skb->len);if(proto == IPPROTO_ICMPV6) {structinet6_dev*idev=ip6_dst_idev(skb_dst(skb));ICMP6MSGOUT_INC_STATS(net, idev, icmp6_hdr(skb)->icmp...
lock_sock(sk);switch(optname) {caseIPV6_ADDRFORM:if(optlen <sizeof(int))gotoe_inval;if(val == PF_INET) {structipv6_txoptions*opt;structsk_buff*pktopt;if(sk->sk_type == SOCK_RAW)break;if(sk->sk_protocol == IPPROTO_UDP || sk->sk_protocol == IPPROTO_UDPLITE) {structudp_soc...
bh_lock_sock(nsk);returnnsk; } inet_twsk_put(inet_twsk(nsk));returnNULL; }returnsk; } 开发者ID:spacex,项目名称:kernel-centos7,代码行数:30,代码来源:ipv6.c 示例2: dccp_v6_ctl_send_reset ▲点赞 6▼ staticvoiddccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb){struct...