)]}'
{
  "commit": "81ada62d70060023923f46ab666cdc2970e1e0ce",
  "tree": "9ed51d05038619d237dbab98456c0e2ce85100df",
  "parents": [
    "77c676da1b717eed7239144fb539dfc4c7b78e04"
  ],
  "author": {
    "name": "Ilpo Järvinen",
    "email": "ilpo.jarvinen@helsinki.fi",
    "time": "Thu Oct 09 14:42:01 2008 -0700"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Thu Oct 09 14:42:01 2008 -0700"
  },
  "message": "tcpv6: convert opt[] -\u003e topt in tcp_v6_send_reset\n\nafter this I get:\n\n$ diff-funcs tcp_v6_send_reset tcp_ipv6.c tcp_ipv6.c tcp_v6_send_ack\n --- tcp_ipv6.c:tcp_v6_send_reset()\n +++ tcp_ipv6.c:tcp_v6_send_ack()\n@@ -1,4 +1,5 @@\n-static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)\n+static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, u32 win,\nu32 ts,\n+                           struct tcp_md5sig_key *key)\n {\n        struct tcphdr *th \u003d tcp_hdr(skb), *t1;\n        struct sk_buff *buff;\n@@ -7,31 +8,14 @@\n        struct sock *ctl_sk \u003d net-\u003eipv6.tcp_sk;\n        unsigned int tot_len \u003d sizeof(struct tcphdr);\n        __be32 *topt;\n-#ifdef CONFIG_TCP_MD5SIG\n-       struct tcp_md5sig_key *key;\n-#endif\n-\n-       if (th-\u003erst)\n-               return;\n-\n-       if (!ipv6_unicast_destination(skb))\n-               return;\n\n+       if (ts)\n+               tot_len +\u003d TCPOLEN_TSTAMP_ALIGNED;\n #ifdef CONFIG_TCP_MD5SIG\n-       if (sk)\n-               key \u003d tcp_v6_md5_do_lookup(sk, \u0026ipv6_hdr(skb)-\u003edaddr);\n-       else\n-               key \u003d NULL;\n-\n        if (key)\n                tot_len +\u003d TCPOLEN_MD5SIG_ALIGNED;\n #endif\n\n-       /*\n-        * We need to grab some memory, and put together an RST,\n-        * and then put it into the queue to be sent.\n-        */\n-\n        buff \u003d alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,\n                         GFP_ATOMIC);\n        if (buff \u003d\u003d NULL)\n@@ -46,18 +30,20 @@\n        t1-\u003edest \u003d th-\u003esource;\n        t1-\u003esource \u003d th-\u003edest;\n        t1-\u003edoff \u003d tot_len / 4;\n-       t1-\u003erst \u003d 1;\n-\n-       if(th-\u003eack) {\n-               t1-\u003eseq \u003d th-\u003eack_seq;\n-       } else {\n-               t1-\u003eack \u003d 1;\n-               t1-\u003eack_seq \u003d htonl(ntohl(th-\u003eseq) + th-\u003esyn + th-\u003efin\n-                                   + skb-\u003elen - (th-\u003edoff\u003c\u003c2));\n-       }\n+       t1-\u003eseq \u003d htonl(seq);\n+       t1-\u003eack_seq \u003d htonl(ack);\n+       t1-\u003eack \u003d 1;\n+       t1-\u003ewindow \u003d htons(win);\n\n        topt \u003d (__be32 *)(t1 + 1);\n\n+       if (ts) {\n+               *topt++ \u003d htonl((TCPOPT_NOP \u003c\u003c 24) | (TCPOPT_NOP \u003c\u003c 16) |\n+                               (TCPOPT_TIMESTAMP \u003c\u003c 8) |\nTCPOLEN_TIMESTAMP);\n+               *topt++ \u003d htonl(tcp_time_stamp);\n+               *topt++ \u003d htonl(ts);\n+       }\n+\n #ifdef CONFIG_TCP_MD5SIG\n        if (key) {\n                *topt++ \u003d htonl((TCPOPT_NOP \u003c\u003c 24) | (TCPOPT_NOP \u003c\u003c 16) |\n@@ -84,15 +70,10 @@\n        fl.fl_ip_sport \u003d t1-\u003esource;\n        security_skb_classify_flow(skb, \u0026fl);\n\n-       /* Pass a socket to ip6_dst_lookup either it is for RST\n-        * Underlying function will use this to retrieve the network\n-        * namespace\n-        */\n        if (!ip6_dst_lookup(ctl_sk, \u0026buff-\u003edst, \u0026fl)) {\n                if (xfrm_lookup(\u0026buff-\u003edst, \u0026fl, NULL, 0) \u003e\u003d 0) {\n                        ip6_xmit(ctl_sk, buff, \u0026fl, NULL, 0);\n                        TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);\n-                       TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS);\n                        return;\n                }\n        }\n\n\n...which starts to be trivial to combine.\n\nSigned-off-by: Ilpo Järvinen \u003cilpo.jarvinen@helsinki.fi\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "910603cd12d22bca996e8b4ad0fd84063a3842fc",
      "old_mode": 33188,
      "old_path": "net/ipv6/tcp_ipv6.c",
      "new_id": "1941c5c888d3a7cbc16e0853bfe2ee66f0107b0e",
      "new_mode": 33188,
      "new_path": "net/ipv6/tcp_ipv6.c"
    }
  ]
}
