All pastes #964795 Raw Edit

Untitled

public text v1 · immutable
#964795 ·published 2008-03-31 15:39 UTC
rendered paste body
root@ismlnx-vm08:/root/openswan-2.5.17# patch -p1 < ../kmem_cache.txt
patching file linux/net/ipsec/ipsec_rcv.c
Hunk #1 succeeded at 1778 (offset -19 lines).
patching file linux/net/ipsec/ipsec_tunnel.c
Hunk #1 FAILED at 1650.
Hunk #2 FAILED at 1805.
2 out of 2 hunks FAILED -- saving rejects to file linux/net/ipsec/ipsec_tunnel.c.rej
root@ismlnx-vm08:/root/openswan-2.5.17# cat linux/net/ipsec/ipsec_tunnel.c.rej
*************** ipsec_tunnel_createnum(int ifnum)
*** 1650,1656 ****
         memset((caddr_t)dev_ipsec->name, 0, IFNAMSIZ);
         strncpy(dev_ipsec->name, name, IFNAMSIZ);
  #endif /* NETDEV_23 */
         dev_ipsec->next = NULL;
         dev_ipsec->init = &ipsec_tunnel_probe;
         KLIPS_PRINT(debug_tunnel & DB_TN_INIT,
                     "klips_debug:ipsec_tunnel_init_devices: "
--- 1650,1658 ----
         memset((caddr_t)dev_ipsec->name, 0, IFNAMSIZ);
         strncpy(dev_ipsec->name, name, IFNAMSIZ);
  #endif /* NETDEV_23 */
+ #ifdef PAUL_FIXME
         dev_ipsec->next = NULL;
+ #endif
         dev_ipsec->init = &ipsec_tunnel_probe;
         KLIPS_PRINT(debug_tunnel & DB_TN_INIT,
                     "klips_debug:ipsec_tunnel_init_devices: "
*************** ipsec_xmit_state_cache_init (void)
*** 1803,1809 ****

          spin_lock_init(&ixs_cache_lock);
  #ifdef HAVE_KMEM_CACHE_MACRO
-        ixs_cache_allocator = KMEM_CACHE(ipsec_ixs,0);
  #else
          ixs_cache_allocator = kmem_cache_create ("ipsec_ixs",
                  sizeof (struct ipsec_xmit_state), 0,
--- 1805,1814 ----

          spin_lock_init(&ixs_cache_lock);
  #ifdef HAVE_KMEM_CACHE_MACRO
+        /* ixs_cache_allocator = KMEM_CACHE(ipsec_ixs,0); */
+         ixs_cache_allocator = kmem_cache_create ("ipsec_ixs",
+                 sizeof (struct ipsec_xmit_state), 0,
+                 0, NULL);
  #else
          ixs_cache_allocator = kmem_cache_create ("ipsec_ixs",
                  sizeof (struct ipsec_xmit_state), 0,
root@ismlnx-vm08:/root/openswan-2.5.17#