~ubuntu-branches/ubuntu/utopic/dnsmasq/utopic

« back to all changes in this revision

Viewing changes to src/rfc2131.c

  • Committer: Package Import Robot
  • Author(s): Simon Kelley
  • Date: 2013-08-04 14:48:21 UTC
  • mfrom: (0.5.5) (12.2.13 sid)
  • Revision ID: package-import@ubuntu.com-20130804144821-53zdaugru2z9mgsp
Tags: 2.66-4
Update resolvconf script. (closes: #716908)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* dnsmasq is Copyright (c) 2000-2012 Simon Kelley
 
1
/* dnsmasq is Copyright (c) 2000-2013 Simon Kelley
2
2
 
3
3
   This program is free software; you can redistribute it and/or modify
4
4
   it under the terms of the GNU General Public License as published by
1256
1256
                  add_extradata_opt(lease, oui);
1257
1257
                  add_extradata_opt(lease, serial);
1258
1258
                  add_extradata_opt(lease, class);
1259
 
                  
 
1259
 
 
1260
                  if ((opt = option_find(mess, sz, OPTION_AGENT_ID, 1)))
 
1261
                    {
 
1262
                      add_extradata_opt(lease, option_find1(option_ptr(opt, 0), option_ptr(opt, option_len(opt)), SUBOPT_CIRCUIT_ID, 1));
 
1263
                      add_extradata_opt(lease, option_find1(option_ptr(opt, 0), option_ptr(opt, option_len(opt)), SUBOPT_SUBSCR_ID, 1));
 
1264
                      add_extradata_opt(lease, option_find1(option_ptr(opt, 0), option_ptr(opt, option_len(opt)), SUBOPT_REMOTE_ID, 1));
 
1265
                    }
 
1266
                  else
 
1267
                    {
 
1268
                      add_extradata_opt(lease, NULL);
 
1269
                      add_extradata_opt(lease, NULL);
 
1270
                      add_extradata_opt(lease, NULL);
 
1271
                    }
 
1272
 
1260
1273
                  /* space-concat tag set */
1261
1274
                  if (!tagif_netid)
1262
1275
                    add_extradata_opt(lease, NULL);
1739
1752
              if (overload[2] & 2)
1740
1753
                {
1741
1754
                  p = dhcp_skip_opts(mess->sname);
1742
 
                  if (p + len + 3 >= mess->sname + sizeof(mess->file))
 
1755
                  if (p + len + 3 >= mess->sname + sizeof(mess->sname))
1743
1756
                    p = NULL;
1744
1757
                }
1745
1758
            }
2234
2247
          !option_find2(OPTION_ROUTER))
2235
2248
        option_put(mess, end, OPTION_ROUTER, INADDRSZ, ntohl(context->router.s_addr));
2236
2249
      
2237
 
      if (in_list(req_options, OPTION_DNSSERVER) &&
 
2250
      if (daemon->port == NAMESERVER_PORT &&
 
2251
          in_list(req_options, OPTION_DNSSERVER) &&
2238
2252
          !option_find2(OPTION_DNSSERVER))
2239
2253
        option_put(mess, end, OPTION_DNSSERVER, INADDRSZ, ntohl(context->local.s_addr));
2240
2254
    }