lib/packetgen/header/dns/opt.rb in packetgen-3.3.1 vs lib/packetgen/header/dns/opt.rb in packetgen-3.3.2

- old
+ new

@@ -1,10 +1,11 @@ # frozen_string_literal: true # This file is part of PacketGen -# See https://github.com/sdaubert/packetgen for more informations +# See https://github.com/lemontree55/packetgen for more informations # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net> +# Copyright (C) 2024 LemonTree55 <lenontree@proton.me> # This program is published under MIT license. require_relative 'option' module PacketGen @@ -35,10 +36,10 @@ # @option options [Integer] :rdlength if not provided, automatically set # from +:rdata+ length # @option options [String] :rdata def initialize(dns, options={}) opts = { name: '.', rrclass: 512, type: 41 }.merge!(options) - super dns, opts + super(dns, opts) self.udp_size = options[:udp_size] if options[:udp_size] self.ext_rcode = options[:ext_rcode] if options[:ext_rcode] self.version = options[:version] if options[:version] self.do = options[:do] unless options[:do].nil?