~ubuntu-branches/ubuntu/hardy/iproute/hardy-proposed

« back to all changes in this revision

Viewing changes to tc/q_atm.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-07-06 10:23:46 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060706102346-tyd1mfjvay0nmz90
Tags: 20051007-4ubuntu1
* Merge from debian unstable, remaining changes:
  - versioned dependency on linux-kernel-headers,
  - MAX_ROUNDS patch to ip/ipaddress.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
                        perror("ioctl ATMARP_MKIP");
180
180
                        return -1;
181
181
                }
182
 
        tail = (struct rtattr *) (((void *) n)+NLMSG_ALIGN(n->nlmsg_len));
 
182
        tail = NLMSG_TAIL(n);
183
183
        addattr_l(n,1024,TCA_OPTIONS,NULL,0);
184
184
        addattr_l(n,1024,TCA_ATM_FD,&s,sizeof(s));
185
185
        if (excess) addattr_l(n,1024,TCA_ATM_EXCESS,&excess,sizeof(excess));
186
186
        if (hdr_len != -1) addattr_l(n,1024,TCA_ATM_HDR,hdr,hdr_len);
187
 
        tail->rta_len = (((void *) n)+NLMSG_ALIGN(n->nlmsg_len))-(void *) tail;
 
187
        tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
188
188
        return 0;
189
189
}
190
190
 
195
195
        struct rtattr *tb[TCA_ATM_MAX+1];
196
196
        char buffer[MAX_ATM_ADDR_LEN+1];
197
197
 
198
 
        if (!opt) return 0;
199
 
        memset(tb, 0, sizeof(tb));
200
 
        parse_rtattr(tb, TCA_ATM_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
 
198
        if (opt == NULL)
 
199
                return 0;
 
200
 
 
201
        parse_rtattr_nested(tb, TCA_ATM_MAX, opt);
201
202
        if (tb[TCA_ATM_ADDR]) {
202
203
                if (RTA_PAYLOAD(tb[TCA_ATM_ADDR]) <
203
204
                    sizeof(struct sockaddr_atmpvc))