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

From: Simon Garner (sgarner_at_expio.co.nz)
Date: Mon 29 Sep 2003 - 23:06:38 BST


On Monday, September 29, 2003 11:57 PM [GMT+1200=NZT],
Paul Sladen <vserver_at_paul.sladen.org> wrote:

> On Mon, 29 Sep 2003, Simon Garner wrote:
>> On Monday, September 29, 2003 3:59 PM [GMT+1200=NZT],
>>> vserver project includes a (linux) kernel patch and utilities.
>> udp.c: In function `udp_v4_lookup_longway':
>> udp.c:239: warning: unused variable `score'
>
> It is a `warning', not an `error' shouldn't stop things compiling;
> do you have `--pedantic-errors' on by any chance?
>
> -Paul
>

The next line is the error:

udp.c:245: `score' undeclared (first use in this function)

Here is some relevant lines from the file... actually I think I see the
problem, "int score" is in the wrong place. Seems to be a bug in the
patch file...

/* UDP is nearly always wildcards out the wazoo, it makes no sense to
try
 * harder than this. -DaveM
 */
struct sock *udp_v4_lookup_longway(u32 saddr, u16 sport, u32 daddr, u16
dport, int dif)
{
        struct sock *sk, *result = NULL;
        unsigned short hnum = ntohs(dport);
        int badness = -1;

        for(sk = udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]; sk != NULL; sk
= sk->next) {
                if(sk->num == hnum && !ipv6_only_sock(sk)) {
[line 239] int score;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                        score = sk->family == PF_INET ? 1 : 0;
#else
                        }else if (sk->ip_info != NULL){
                                if (udp_in_list (sk->ip_info,daddr)){
[line 245] score++;
                                }else{
                                        continue;
                                }
                        score = 1;
#endif
                        if(sk->rcv_saddr) {

This is a vanilla 2.4.21 patched with 2.4.21-ctx17.

But Herbert has pointed me toward some newer patches for 2.4.22 in any
case.

-Simon


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 29 Sep 2003 - 23:42:46 BST by hypermail 2.1.3