About this list Date view Thread view Subject view Author view Attachment view

From: Ola Lundqvist (opal_at_debian.org)
Date: Mon 09 Aug 2004 - 13:29:01 BST


Hello

I'm the maintainer of kernel-patch-ctx in Debian. I have prepared a version of 1.28 for
debian of the kernel patch. I had to modify it some in order to make it apply nicely
because Debian ship with some patches for ipv6 etc.

I get a problem with include/net/route.h.

Problematic function here:

---

static inline int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 tos, int oif, u8 protocol, u16 sport, u16 dport, struct sock *sk) { struct flowi fl = { .oif = oif, .nl_u = { .ip4_u = { .daddr = dst, .saddr = src, .tos = tos } }, .proto = protocol, .uli_u = { .ports = { .sport = sport, .dport = dport } } };

int err; struct iproot_info *ip_info = current->ip_info; if (ip_info != NULL) { __u32 ipv4root = ip_info->ipv4[0]; if (ipv4root != 0) { int n = ip_info->nbipv4; if (src == 0) { if (n > 1) { u32 foundsrc; int i; err = ip_route_output(rp, dst, src, tos, oif); if (err) return err; foundsrc = (*rp)->rt_src; ip_rt_put(*rp); for (i=0; i<n; i++){ u32 mask = ip_info->mask[i]; u32 ipv4 = ip_info->ipv4[i]; u32 netipv4 = ipv4 & mask; if ((foundsrc & mask) == netipv4) { src = ipv4; break; } } } if (src == 0) src = dst == 0x0100007f ? 0x0100007f: ipv4root; } else { int i; for (i=0; i<n; i++) { if (ip_info->ipv4[i] == src) break; } if (i == n) return -EPERM; } if (dst == 0x0100007f && !vx_check(0, VX_ADMIN)) dst = ipv4root; } } if (!dst || !src) { err = __ip_route_output_key(rp, &fl); if (err) return err; fl.fl4_dst = (*rp)->rt_dst; fl.fl4_src = (*rp)->rt_src; ip_rt_put(*rp); *rp = NULL; } return ip_route_output_flow(rp, &fl, sk, 0); }

---

The problem is that there is no ip_route_output function in this kernel tree. What is intended here and what can I use instead. I have a ip_route_output_flow and a ip_route_output_key function to use...

extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); extern int ip_route_output_key(struct rtable **, struct flowi *flp); extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);

I can probably fix this but I do not want to create a bug so I need to know what this function should accomplish.

Best regards,

// Ola

-- --------------------- Ola Lundqvist --------------------------- / opal_at_debian.org Annebergsslingan 37 \ | opal_at_lysator.liu.se 654 65 KARLSTAD | | +46 (0)54-10 14 30 +46 (0)70-332 1551 | | http://www.opal.dhs.org UIN/icq: 4912500 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- _______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 09 Aug 2004 - 13:29:25 BST by hypermail 2.1.3